Quiet talks brokered by a government desperate to stop a growing economic threat led to two rail rivals coming together with a workaround to bypass the Tyendinaga blockade site.

Since last week, Canada's two largest railways — CN and Canadian Pacific — have been quietly sharing their rail lines to transport essential supplies to communities in need, according to multiple government, CN and industry sources.

Protests by the Mohawks of Tyendinaga crippled passenger and freight train traffic on CN's line near Belleville for more than two weeks in solidarity with anti-pipeline protests in northern B.C against the construction of the planned Coastal GasLink pipeline. Ontario Provincial Police officers on Monday arrested 10 demonstrators to get service back up and running on the line.

But as a result of what multiple government sources are describing as a very "rare" collaboration between the two rail giants, CN trains have been circumventing blockades using alternate routes — some through the U.S. — to continue deliveries to Quebec and Maritime communities facing shortages of essential goods such as propane, chemicals for water treatment facilities and animal feed.

WATCH | OPP breaks up rail blockade:

CBC reporter Olivia Stefanovich describes how quietly the OPP moved in before arresting protesters at the blockade. 2:10

Transport Canada and Transport Minister Marc Garneau's office approached the two companies and helped to negotiate the rail-sharing deal — which is still active in parts of the country dealing with blockades.

Garneau said today the collaboration will not take care of the freight backlog completely, but it will help.

"It does give us some extra wiggle room," he said in French outside today's cabinet meeting. "But eventually we want all the barricades to come down."

Transport Minister Marc Garneau reacts to CN and CP sharing their rail lines to transport essential supplies to communities affected by the blockades. 1:15

The deal was kept under wraps by all involved; even the industries affected weren't told about the arrangement. The Retail Council of Canada told CBC News it didn't know about the deal. Neither did associations representing propane suppliers in Quebec and across Canada. The groups had been warning of looming supply shortages in Quebec and Eastern Canada, where families, farmers and companies have been rationing goods. Many households use propane to heat their homes and barns.

Government sources say they didn't advertise the deal, fearing that more blockades could pop up in response.

Prime Minister Justin Trudeau hinted at the CN/CP arrangement yesterday on the way into question period in the House of Commons.

"Over the past number of days we've been working with rail carriers to ensure that many trains continue to use alternate routes to get through and that's one of the reasons we've been able to avoid some of the most serious shortages," said Trudeau.

Karl Littler, senior vice president, public affairs, of the Retail Council of Canada, learned about the arrangement from CBC News and commended it.

"We're talking about foods, we're talking about fuel to keep people heating in what can be a cold winter," said Littler. "You're talking about a lot of stuff that Canadians need everyday. I think it's the responsible thing to look to see what alternative channels exist and if that means collaboration in these circumstances, so much the better."

One CN conductor said they witnessed how covert the operation has been. The source said they saw specially trained CN workers use CP engines, with that company's logo on them, to haul unmarked CN cargo.

CP told CBC News it didn't have a comment to add. CN also isn't commenting on the deal, saying only that it's "pleased the illegal blockade in Tyendinaga has come to an end."

"We are also monitoring our network for any further disruptions at this time," said CN spokesperson Jonathan Abecassis in a statement.