Buried under the niceties of a rekindled Canadian-American relationship was the quiet resolution of a long-standing dispute between Ottawa and Washington. An agreement that, dependant on the fine print, could break down a wall between the two countries, allowing for a whole new world of data collection and information analysis on citizens from both countries.

The announcement came as a sidenote to the climate change strategy announced by the two leaders, with fanfare, in DC on Thursday.

"Today, we agreed to share more information — including with respect to our no-fly lists and full implementation of our entry/exit system — even as we uphold the privacy and civil liberties of our respective citizens," President Barack Obama said in a joint press conference with Prime Minister Justin Trudeau in the White House Rose Garden.

A joint statement added some detail to Obama's statement.

"The government of Canada has assured the United States it will complete the last phase of a coordinated entry and exit information system so the record of land and air entries into one country establishes an exit record from the other," the statement from the two leaders reads.

Obama framed the deal around stemming the flow of foreign fighters between the two countries — even though evidence for that supposed trend appears to be non-existent — but the effects of the deal could impact the privacy rights of all cross-border shoppers, tourists, and anyone else who crosses the world's largest land border.

"Mr. Harper insisted that Canadian agencies not be able to access this new information about Canadians leaving Canada unless there were already an open investigation into that person."

The entry/exit deal dates back to the 2011 'Beyond the Border' plan to boost security and reduce trade restrictions between the two countries, although it originated in a recommendation from the 9/11 Commission, which called for more information-sharing on border-crossers between the two countries — even though none of the hijackers crossed into America from Canada, as has been frequently reported.

The 2011 plan commits the two countries to "establish coordinated entry and exit systems at the common land border" and "exchange biographical information on the entry of travelers, including citizens, permanent residents, and third country nationals" whenever they cross one country into the other.

But that part of the plan never came into force, at least not as envisioned. Canada began sharing information with its American counterparts on all third-country nationals — border-crossers who were neither American nor Canadian — but never began doing so for its own citizens, even though it committed to start in June 2014.

If it had been adopted, it would mean that Canadian border agents would transmit information when Americans enter Canada back to American border guards, and vice versa for Canadians. It would give both governments a clearer picture of who is crossing the border to shop, who is overstaying their visa, and where holes in the security apparatus exist.

Most significantly, it would create a new source of traffic into the databases that American analysts use to track and analyze threats, and which they use as the basis for everything from establishing more extensive online surveillance to adding names to the no-fly list.

But government memos obtained last year suggest that Canada wants to use the system to track those who are receiving government benefits in Canada, even though they're in the United States.

The program was shot down by an unlikely source — then Prime Minister Stephen Harper.

Howard Anglin, who served as deputy chief of staff to the prime minister prior to his party's defeat in 2015 told VICE News that Harper "insisted that security agencies already have a good reason to suspect an individual — of flying overseas to join ISIS, of plotting here at home, or of more routine criminality — before information could be accessed under appropriate protocols."

"A program on such a scale would constitute a major shift in the dynamics of our current data-sharing regime."

While Harper may have been the scourge of most privacy advocates, as his government regularly introduced legislation that allowed for ever-more expansive data collection and surveillance, Anglin said when it came to approving plans like the Beyond the Border deal, Harper balked. "Mr. Harper was always crystal clear on this distinction — he did not believe the routine mining of data or meta-data to identify new threats was justifiable or explicable to Canadians."

Those privacy-mindful directives were certainly at odds with Harper's legislative agenda, which included legislation that allow for wide-scale metadata collection and analysis — although that legislation was later iced, after a public outcry. Either way, Anglin said Harper was adamant.

"When it came to implementing the agreement to Canadian citizens...Mr. Harper insisted that Canadian agencies not be able to access this new information about Canadians leaving Canada unless there were already an open investigation into that person," Anglin said.

Anglin said the devil of this deal will ultimately be in the details, and that it will be up to both sides to put safeguards and walls around the data being shared, so as to ensure that either side can't mine the personal information or retain it for long periods of time.

The privacy commissioner at the time, Jennifer Stoddart, also had grave concerns about the Beyond the Border plan and the sharing of entry and exit data.

"A decade ago, we needed to show customs agents a birth certificate and photo ID. Today, our passports are scanned, our image is captured by surveillance cameras; we are checked against watch lists and police records; our laptop or smart-phone may be searched; and the agent may even Google us to see what pops up," she said in a 2011 blog post, adding her office was concerned about the sharing of biometric data, warning that "when collected indiscriminately and stored in networked databases, we draw ever closer to the bleak reality of a 'surveillance society.'"

Stoddart wrote in one position paper that "a program on such a scale would constitute a major shift in the dynamics of our current data-sharing regime."

As the Trudeau administration notes, other countries do have entry/exit information-sharing systems. Notably, the European Union shares passport data as its citizens move throughout its member states — but as the privacy commissioner notes, there are significant privacy protections embedded into that system.

Stoddart recommended that, should Ottawa sign up for an information-sharing program for its border-crossers, it should model it after the European Union's program. She warned that emulating how the Americans have crafted data collection at the border, however, could be problematic.

"Unlike the European model, which only collects photographs and only provides limited access to domestic law enforcement agencies," Stoddart wrote, the American system links to a much wider database.

"Even risk assessment in these segmented systems is beginning to converge. Being flagged as a threat within [the US Interagency Border Inspection System] (IBIS), for example, may result in individuals being added to the US 'No Fly' list. In addition, IBIS interfaces with the FBI's National Crime Information Center (NCIC), state police forces, the National Law Enforcement Telecommunications Systems (NLETS), as well as 20 other agencies including Interpol, the Internal Revenue Service and Secret Service."

The privacy commissioner wrote that "both citizens and visitors to the US and Canada must be fully informed of the programs' stated purposes, the extent of their application and use of personal information and who individuals personal information will be properly protected."

A spokesperson for Public Safety Canada, a federal agency, didn't offer specific details on the plan itself, but did say that the new changes will be seen "in the coming months" and that changes to the law will "provide authorities to the Canada Border Services Agency to collect exit information on all travellers, including Canadians, to be obtained from the US for all travellers departing Canada by land, and from airlines for flights departing from Canada," the spokesperson said in an email, although he emphasized "Canada will not systematically share air exit information with the US."

The spokesperson said that the government will be consulting with the privacy commissioner before they introduce the changes, and that it has Canadians' civil liberties in mind.

The timing of the entry/exit announcement appears opportune for Obama, as he prepares his legacy in his final months.

"I think the president would like to see [entry/exit] as a tick off the box for his Beyond the Border program, which he started," said Laura Dawson, Director of the Canada Institute at the Wilson Center, at an event on the state of the American-Canadian relationship hosted in Washington last week.

But the deal appeared to elude both leaders prior to the D.C. summit. A leak to the Canadian Press in early March suggested the agreement had been put off, as the two countries couldn't figure out how to deal with oversight for the armed border guards who could be given a more substantial role in policing the border under other parts of the Beyond the Border pact.

But the deal got done, and Canada did get something in return — the joint statement reads that the two countries have "jointly developed protocols to exchange information on those who present a clear threat, including exchanging our respective 'No-Fly' lists, with appropriate protections for the handling and dissemination of such information and processes to correct inaccurate information."

A number of Canadians have found themselves mistakenly on one of the two countries' no-fly lists, including toddlers. The commitment to making sure that those lists have the correct information appears to be designed to address those snafus.