That's one aspect of a broad agreement that could touch every mode of transport between Canada and the U.S. — including travel by car, train, bus and ship.
It would take the pre-clearance customs system already in place at major Canadian airports and apply that to land and maritime vehicles, allowing travellers to clear customs before the border.
The goal is to clear border choke points and speed up travel.
The agreement was hailed as historic by both governments at a signing ceremony Monday with Public Safety Minister Steven Blaney and U.S. Homeland Security Secretary Jeh Johnson.
"This momentous occasion ... will advance the shared interest in perimeter security and economic competitiveness for our two countries," Johnson said.
Travellers won't see results immediately.
The deal must still be ratified in legislation in both countries — which is almost always a more complex process in the U.S. Congress than in Canada's Parliament.
The logistical details also need to be worked out at bus stations, train stations, ports and highway checkpoints. For individual cars, Johnson said there could be a case-by-case approach, with different systems being adopted at different border points.
What Monday's agreement does is set up a legal framework for those changes.
It allows customs agents to work in the country next door. It says agents would be allowed to carry arms. And it says they can't make arrests on foreign soil.
There are existing examples of how the system might work.
Pilot projects have operated in different parts of the continent. Air travel pre-clearance has been used for decades, with U.S. checkpoints at eight Canadian airports allowing air travellers to clear customs in cities like Vancouver, Toronto and Montreal and to skip the queues when they land.
The countries had signalled their intention to expand the principle to land and sea travel as part of the 2011 Beyond the Border deal between Prime Minister Stephen Harper and President Barack Obama.
But they missed a late-2012 deadline to reach a legal agreement that would let law-enforcement officials operate inside the neighbouring country.
A little more than two years later, they have reached that deal.
"This was years in the making," Blaney said. "Of course, an agreement of this magnitude presents a number of challenging hurdles for our two countries. But they were successfully overcome."
He said the agreement respects the sovereignty and the laws of both countries.
The full text has yet to be released, and will be presented to Parliament in a few weeks. The Canadian government released some details, saying the deal would:
—Allow agents to hold suspects in the other country, but not arrest them. An agent from the host country would have to be present for an arrest.
—Establish criminal liability for customs officers. Criminal acts committed by an agent at work would be punished by the employer's country, while criminal acts committed off-duty would be punished by the host country.
—Require foreign agents to respect the host country's laws — including, on Canadian soil, the Charter of Rights and Freedoms.
The business community celebrated.
"It's dramatic, it's historic, it's a big day in Canada-U.S. relations," said Maryscott Greenwood of the Canadian American Business Council.
She called it an indication that the Canada-U.S. relationship works well, despite irritants such as the Keystone XL pipeline. Her group is still waiting, however, for widespread adoption of new cargo-inspection systems.
Also on HuffPost