Boris Johnson said there could be checks on goods entering Northern Ireland if they are coming from south of the border after Brexit.
The British prime minister was in Belfast to meet Northern parties after a deal was struck to restore the Stormont Assembly.
Taoiseach Leo Varadkar also met with the parties along with Tanaiste Simon Coveney, who brokered the deal last week.
"I don't foresee any circumstances whatsoever in which there will be any checks on goods going from Northern Ireland to Great Britain," he said.
"The only circumstances in which you'd imagine the need for checks coming from Great Britain to Northern Ireland was if those goods were going on to Ireland and we had not secured - which I hope we will - a zero-tariff, zero-quota agreement with our friends and partners in the EU."
In the main hall of Stormont, before an audience of children from Dunloy St Joseph's Primary School on a tour of parliament, he spoke admiringly of the leadership shown. Mr Johnson said it was now up to the parties to make it work.
He mocked the utterance of Tony Blair, who said about the Good Friday Agreement: "I feel the hand of history upon our shoulders."
"Never mind the hand of history," Mr Johnson said. "I see the hand of the future."
However, the prime minister did not provide any figures for the amount of money to be provided by the British government to Northern Ireland.
Sinn Fein finance minister Conor Murphy said the £2bn (€2.3bn) being spoken of would not be enough.
Mr Varadkar said the Good Friday Agreement was back up and running again.
He and Mr Johnson discussed co-operation between Ireland and Britain over the next couple of years and said a post-Brexit trade deal should be in place as soon as possible.
Mr Varadkar said he looked forward to beefing up east-west co-operation between the UK and Ireland, the UK having a new relationship with the EU and a new trade deal in place.
The last DUP/Sinn Fein-led coalition government collapsed in January 2017 over a row about a botched energy scheme.
It widened to take in wrangles on matters such as the Irish language and the legacy of the Troubles.