An agreement most people have never heard of is encouraging thousands of migrants to enter Canada illegally – but it’s also deterring many more asylum claims from occurring in the first place.

Recent media attention has focused on the growing number of refugees walking illegally across the border to seek asylum in Canada.

Migrants have trekked across the frozen North Dakota prairie, sometimes walking 80 miles or more through snow and rugged terrain. Once they enter Manitoba, they promptly surrender to the Royal Canadian Mounted Police (RCMP) in the hopes of making a claim for asylum. Similarly, in Quebec, hundreds have crossed from New York State via a snowy border ditch.

The motivation to seek asylum in Canada is not hard to understand, but the decision to walk long distances in frigid temperatures, rather than drive or fly to an authorized border crossing is puzzling. But the pieces fall into place when one considers the strange incentives created by the 2004 Canada-U.S. Safe Third Country Agreement (STCA), which governs asylum claims at U.S.-Canada border crossings.

This relatively obscure agreement has encouraged claimants to jump the border before requesting asylum. But, it also accomplishes its intended outcome, which is to deter asylum claims from happening in the first place.