Irish President Michael D Higgins has said he shares the concerns of the country's premier Leo Varadkar that there is a risk of a return to violence if a hard border is imposed post-Brexit.
Mr Higgins said: "I do share the Taoiseach's concern."
The presidential candidate, who is running for a second term in office, added: "When there was a hard border in place it encouraged an extraordinary level of violence and killings.
"I agree with the Taoiseach ... it is a risk that we should not take."
Mr Varadkar warned last week there was a "real risk" of a return to violence in Ireland if a hard border was re-instated between Northern Ireland and Ireland.
His comments drew considerable criticism from the Democratic Unionist Party's Sammy Wilson who branded Mr Varadkar "vile" and accused him of using terrorist victims to scaremonger over Brexit.
Mr Higgins said whatever the outcome of the Brexit discussions between the United Kingdom and the EU, people on the island of Ireland would always have to work for peace.
"The agreement is not something on paper, the peace must exist in the minds of people," he said.
"We've a long way to go."
He added that the communities were "still too divided".
In an interview with Press Association, Mr Higgins also dismissed attacks made by Sinn Fein candidate Liadh Ni Riada about his presidential expenses as "outrageous".
Ms Ni Riada wrote to Mr Higgins' campaign office on Monday over his use of public money and asked him to explain reports that asserted Mr Higgins has been "using the OPW (Office of Public Works) to maintain the garden and grounds" of his private residence in Galway.
Mr Higgins said: "I have asked the Office of Public Works to do nothing in my house in Galway. The only works that have been carried out have been at the requests of An Garda Siochana and the OPW has fulfilled the Garda Siochana's request."
He continued: "The suggestion that there was anything either requested by me, or by my wife or my family, for the enhancement of our (residence), is simply an outrageous untruth."
Mr Higgins and his wife Sabina live in Aras an Uachtarain in Dublin, whereas the Galway house is their former family home.
The president said the works carried out in the Galway property included the construction of a Garda hut, some stone flags to enable the hut "to be accessed in bad weather" and the cutting of some branches for CCTV cameras.
The presidential hopeful also said the other candidates' queries about his expenses "shouldn't be used as a substitute for the absence of a platform".
Elected in 2011, Mr Higgins took up the coveted seven-year term after pipping six other candidates to the post.
The former Labour party poet and politician said he had put his own stamp on the presidency, as his predecessors had done before him.
"I am someone who came out of poverty with no prospects of education and became a university teacher and then left the university to take my stand on particular public issues," he said.
He said he knew what was achievable within the confines of the Irish Constitution and he had never promised any initiative that was not achievable.
Asked about the other candidates' campaign promises, he replied: "I think some of what has been proposed would be difficult to fit within even a stretched role of the president."
He added: "What people will vote for on Friday is my record and my probity as a public representative for so long and in so many different offices."