Conservative Party leadership hopeful Boris Johnson has said that "under no circumstances" will there be a hard border on the island of Ireland.
Addressing Tory members in Belfast, he said that the issue would be resolved in a free trade deal after Brexit.
Mr Johnson also said that the backstop amounted to "moral blackmail" of the British government.
His rival Jeremy Hunt said that any Brexit deal with the EU would mean changing the backstop.
The backstop, which is included in the Brexit Withdrawal Agreement to avoid a hard border on the island of Ireland post-Brexit, has been a contentious issue between the UK and the EU.
Last week, the Taoiseach said that whoever takes over as the next British prime minister needs to understand that the EU means what it says in relation to the Withdrawal Agreement not being reopened.
"Under no circumstances, whatever happens, will I allow the EU or anyone else to create any kind of division down the Irish Sea or attenuate our Union," Mr Johnson said.
"That is why I resigned over Chequers. It is a terrible moral blackmail it puts on the UK Government. We can't have that."
Mr Johnson and Jeremy Hunt, who is also hoping to become the next Tory party leader, faced questions about their Brexit plans at a hustings. They are visiting Belfast as they seek to win over party members.
Mr Johnson told party members: "Of course we need to sort out the problems of the Northern Irish border, where those problems should be sorted out in the context of the free trade deal that we are going to do when we have left on October 31st.
"I think it's absolutely vital here in Northern Ireland to stress two things.
"Number one: that we will under no circumstances have a hard border. There will be no physical checks or infrastructure at the border in Northern Ireland.
"And number two: we will make sure we have an exit from the EU, a Brexit, that allows the whole UK to come out entire and undivided and we keep our union absolutely intact."
He also said that if he became prime minister, he would do everything he could to "energise" talks to restore devolved government at Stormont.
"I think they need to get back round the table as fast as possible. They need to be sorting this thing out. I would urge all sides to get on with it, restore Stormont.
"I would do whatever I can personally to energise and direct the talks and try and bring people together," he said.
Earlier, Mr Hunt gave his commitment to get power-sharing back up and running in Northern Ireland.
He said: "First of all, it's totally unacceptable that politicians who are paid to run the NHS, to run the schools, to promote inward investment are not turning up to work and doing their job.
"What would I do as prime minister? Well, I think the lesson of that historic achievement back in 1998 is that the only way to do this is with the personal involvement of the prime minister.
"I think Theresa May has been very committed to Northern Ireland and to the union, but I give you this commitment that I too as prime minister will put in the time personally to get that assembly back up and running."
He also said that any Brexit deal with the EU would mean changing the Northern Ireland backstop.
"I do recognise that we are never going to have a deal to leave the EU with the backstop. So it has to change or it has to go," he said.
He said the problem with the backstop was that it would "trap" the UK into following EU customs tariffs until the EU gave its permission to leave.
"For a Brexit vote that was about bringing back sovereignty that is not acceptable," he said.
"I was one of the people who argued against accepting the backstop in the Cabinet, but I think it is important the prime minister has a loyal foreign secretary so I kept those discussions private.
"But that has to change and we have to find a different solution," he said.
Mr Hunt also called on the DUP to "do their bit" and help get a Brexit deal through parliament.
He also gave personal backing to legalisation on abortion and same-sex marriage in Northern Ireland.
Mr Hunt said: "These are deeply personal issues.
"If I was Northern Irish, I would want the law changed in both of those areas.
"This is a devolved matter and I think the best way to resolve this is to get the Assembly back up and running and to establish a consensus in the province so that we can go forward on these very difficult issues."
However, Mr Johnson refused to back the legalisation of same-sex marriage and abortion, saying they are devolved issues for Stormont.
"I think this is preeminently a matter for the people of Northern Ireland," he said.
Following the hustings event Mr Johnson travelled to Stormont to meet DUP leader Arlene Foster.
In a tweet Mrs Foster said they had a "useful" discussion about "delivering on the EU referendum result" and "restoring devolution" at Stormont.
DUP MP's warning over Brexit
Any ambivalence by the next British Prime Minister will only encourage intransigence on behalf of the EU over Brexit, according to a DUP MP.
Speaking on RTÉ's Drivetime, Sammy Wilson said the EU and Irish Government's stances on Brexit were based on the fact they were dealing with a "weak" leader in the form of Theresa May.
Mr Wilson said that if the UK decides to leave the EU without a deal, then European officials will be eager to begin "serious talking".
He said he does not believe the EU could stand a "prolonged period" without receiving the €39bn it is "expecting" from the UK, while he also said the Irish economy could not stand tariffs which would be imposed by the UK.
Mr Wilson said that if he was the next British leader he would inform EU officials that Britain would be leaving without a deal on 31 October and say: "If you want to have a deal with the UK so you get money from us and access to our very lucrative markets and co-operation on security and intelligence then come and talk to us".