Canadian customs agents could soon work in the U.S. and carry firearms, and the U.S. border guards could do the same in Canada, as a result of a new border agreement between Canada and the U.S.

Public Safety Minister Steven Blaney and Homeland Security Secretary Jeh Johnson have signed a customs pre-clearance agreement for rail, land and sea travel that was years in the making.

The arrangement would allow customs agents to work in each other's countries, which means they could screen passengers away from the border and ease the choke points.

That process already exists in air travel at eight airports. People can clear U.S. customs in cities such as Vancouver, Toronto and Montreal and then, when they land, skip lines in U.S. airports.

The countries had signalled their intention to expand that arrangement to land and sea travel as part of the 2011 Beyond the Border deal between Prime Minister Stephen Harper and President Barack Obama.

Homeland Security Secretary Jeh Johnson, left, and Canadian Minister of Public Safety and Emergency Preparedness Steven Blaney chat during a ceremony in Washington, D.C., on Monday, March 16, 2015, to sign a pre-clearance agreement as part of the Beyond the Border Initiative. (Evan Vucci/Associated Press) 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 finally reached that deal.

"This historic new agreement builds on decades of successful pre-clearance operations in Canadian airports," Blaney said in a statement distributed by the U.S. Department of Homeland Security.

"It will enhance the security at our border and create jobs and growth in Canada by improving the flow of legitimate goods and people between our two countries."

Maryscott Greenwood of the Canadian American Business Council said the agreement will use modern technology to speed up things at the border.

"It's dramatic, it's historic, it's a big day in Canada-U.S. relations," she said.

The statement says the agreement applies to all modes of transport, which could include passenger vehicles.

It also says customs agents will be allowed to carry firearms in each other's countries.

Legal, budget challenges still remain

What's not clear is how easily the plan might be implemented. The agreement does not guarantee several developments that would be crucial:

Legislation is required. In Canada, government-supported legislation almost always passes Parliament. In the U.S., even routine legislation can mean protracted drama.

Budgeting for new customs infrastructure away from the border is yet to come.

Participation of the private sector in places such as bus and train stations has to be nailed down.

The governments have expressed a desire to open the border to legitimate travellers, while still screening for criminals. In a recent speech, Johnson described the chilling effect of the 2001 terrorist attacks on U.S. border security.

The statistics bear that out.

Land travel into the U.S. declined in 2001, and it never recovered. Data from the U.S. Bureau on Travel Statistics shows 34 per cent fewer vehicle passengers entered the U.S. last year across the northern border compared with 2000, with the biggest drops occurring in 2001 and 2003.

A study by Deloitte four years ago pointed to several reasons for a decline in Americans making the back-and-forth trip — one was border wait times, but the study also cited currency fluctuations and the opening of casinos on the U.S. side. Also, the U.S. imposed tighter travel-document rules in the wake of the 2001 attacks.