Media playback is unsupported on your device Media caption The five Conservative leadership contenders were asked about resolving the Irish border issue

The five remaining candidates to become the next prime minister have clashed over how to avoid a hard border in Ireland after Brexit.

The MPs running to become Conservative leader answered questions from the public in a live debate on BBC One.

All five agreed the border between Northern Ireland and the Republic of Ireland should remain "free and open".

But they offered different visions of how they would ensure this.

Four of the five have rejected the backstop, which was part of the withdrawal agreement negotiated by Prime Minister Theresa May.

The backstop is a position of last resort to maintain a seamless border on the island of Ireland in the event that the UK leaves the EU without securing an all-encompassing deal.

Only International Development Secretary Rory Stewart spoke in favour of it.

BBC viewer Mark Nolan, from Ballyclare in County Antrim, asked the candidates how they would "solve the issue of the Irish border".

Image caption The debate was the first to feature Boris Johnson

Frontrunner Boris Johnson said he remembered the Troubles and "nobody wants to see the return of any kind of infrastructural or hard border" on the island of Ireland, insisting the UK government would "never" do that.

He insisted the problems posed by trade across the border could be resolved during an implementation period as the UK leaves the EU.

The former foreign secretary argued the EU could be persuaded to amend its Brexit deal as it did not want the UK to leave in a disorderly manner and wanted the £39bn so-called divorce bill negotiated as part of the withdrawal agreement.

Image caption Boris Johnson said "nobody wants to see a hard border"

Foreign Secretary Jeremy Hunt said technology could be used to create a "soft border", but it was important the UK was not "trapped" indefinitely in the customs union.

"It is for us to come up with the solutions that would work," he said.

"What we can't have is a return to border infrastructure on the island of Ireland, because that was one of the fundamental achievements of the Good Friday Agreement."

Media playback is unsupported on your device Media caption What do the British public want to ask the Conservative hopefuls?

Home Secretary Sajid Javid said the backstop needed to be time-limited, arguing Parliament would not vote for it as it stood.

Mr Javid previously pledged to pay Ireland for the cost of border technology.

"Border force has looked at this. It is perfectly possible to have an open border with two different customs arrangements on either side of the border using existing technology," he said.

The Irish government and EU have both rejected this argument.

'Supercharged'

Environment Secretary Michael Gove said the "peace process is about much more than just trade across the border".

He said there was a need to "supercharge" work on alternative arrangements that could replace the backstop.

Rory Stewart said the only way to ensure an open border was through a withdrawal agreement that must include the backstop as it is currently configured.

This would see Northern Ireland staying aligned to some rules of the EU single market.

Mr Stewart said the EU had made it "entirely clear" the withdrawal agreement must include the currently configured backstop.

Dominic Raab was knocked out of the Tory leadership race in the second ballot of MPs earlier on Tuesday.

Media playback is unsupported on your device Media caption Dame Cheryl Gillan announces the result of Tuesday's Tory leadership vote - with five going through the next round

The next ballot will take place on Wednesday, with the candidate with the lowest number of votes eliminated.