The Canada–United States Safe Third Country Agreement (STCA) (French: Entente sur les tiers pays sûrs
, ETPS) is a treaty, entered into force on 29 December 2004, between the governments of Canada and the United States to better manage the flow of refugee claimants at the shared land border.
 Under the agreement, persons seeking refugee status must make their claim in the first country in which they arrive, between either the United States or Canada, unless they qualify for an exception. For example, refugee claimants who are citizens of a country other than the United States who arrive from the US at the Canada–United States land border can only pursue their refugee claims in Canada if they meet an exception under the Safe Third Country Agreement. 
 In March 2023, the Safe Third Country Agreement was updated to enact tougher immigration policies, especially with regards to asylum seekers and border crossing at 'irregular' border crossings like Roxham Road.
 The STCA has faced challenges in the Canadian courts alleging that Canada's participation violates the Canadian Charter of Rights and Freedoms. After success for the challengers in Federal Court in 2020, but overturn in the Federal Court of Appeal, in June 2023 the Supreme Court of Canada found no violation of section 7 of the Charter, but sent the case back to Federal Court for review of whether it might violate section 15.
 The agreement was signed on December 5, 2002, in Washington, D.C. by Bertin Côté (Deputy Head of Mission, Embassy of Canada) and Arthur E. Dewey (Assistant Secretary of State for Population, Refugees, and Migration, U.S. Department of State).
 The Safe Third Country Agreement applies to refugee claimants who are seeking entry to Canada or the United States at Canada-United States land border crossings (including by rail). It also applies at airports if a person who is seeking refugee protection in country B was determined not to be a refugee in country A, and is in transit through country A as part of their deportation.
 For example, a refugee claimant in Canada who has been determined not to be a refugee in the United States, has been ordered deported from the United States, and is in transit through a Canadian airport as part of their removal from the United States.
 Exceptions to the Safe Third Country Agreement are defined as four types:
 In addition to meeting the criteria for an exception under the agreement, refugee claimants must still meet all other eligibility criteria of the relevant immigration legislation for the country that they are claiming status in. Though refugee claimants who enter Canada at official crossings are usually sent back to the US, they would not be sent back if they cross at locations in between designated ports of entry; in this case, their claims will be heard, and many immigration experts consider this to be a loophole within the agreement.
 On March 24, 2023, the U.S. and Canada revised the asylum seeker policy. Under the revision, Canada will be allowed to send migrants who cross at unofficial ports of entry at America's northern border back to the U.S., while the U.S. will also be able to turn back asylum seekers who travel across the border from Canada. In return, Canada agreed to allow 15,000 more people from the Western Hemisphere to migrate to Canada legally. Nevertheless, the revision is acknowledged to have limited the movement of asylum seekers. Canadian Prime Minister Justin Trudeau confirmed that the revisions would go into effect that midnight.
 Shortly after inauguration, U.S. President Donald Trump signed these Executive Orders, which have since been revoked by his successor, Joe Biden:
 In response to Executive Order 13769, immigrant and civil-rights advocacy groups in Canada called for the federal government to suspend the Safe Third Country Agreement. These groups included Amnesty International, the Canadian Civil Liberties Association, the Association québécoise des avocats et avocates en droit de l'immigration, the British Columbia Civil Liberties Association, the Canadian Association of Refugee Lawyers, the Canadian Council for Refugees, and a group of 200 law professors from universities across Canada.
 On January 30, 2017, Immigration, Refugees and Citizenship Canada (IRCC) critic Jenny Kwan, of the New Democratic Party (NDP), proposed an emergency debate on "President Trump's ban on immigration and travel from seven countries in the Middle East and North Africa." During the debate, the NDP called on the government to immediately suspend the Safe Third Country Agreement, citing that "Canada can no longer have confidence that the American refugee system is providing a safe haven for those who face persecution." The Official Opposition Conservative Party of Canada stated that they would not oppose a suspension of the agreement, while the Green Party of Canada voiced support for suspending the agreement.
 Ahmed Hussen, speaking as Canada's Minister of IRCC, claimed that the conditions of the Safe Third Country Agreement continued to be met. The governing Liberal Party of Canada did not communicate any plans or intentions to suspend the agreement.
 Safe third country agreements are not explicitly mentioned in the 1951 Convention Relating to the Status of Refugees or the 1967 Protocol Relating to the Status of Refugees. Instead, their legality is derived from Article 31 of the 1951 convention, which states that a refugee should not be punished for illegally entering a country if they are arriving directly from a country where they were under threat. The Office of the United Nations High Commissioner for Refugees (UNHCR) itself has cautioned against interpreting safe third country agreements too broadly, though it acknowledges that they may be acceptable in some circumstances. Such ambiguities have led some legal professionals in Canada to question the legality of the Canada–United States Safe Third Country Agreement.
 As of February 2017, increasing numbers of refugee claimants began to cross the Canadian border at locations other than official border checkpoints. This is in order to avoid the effects of the agreement, any refugees presenting at a border crossing would be automatically turned back to the United States under the STCA provisions. As it was not illegal under the Immigration and Refugee Protection Act or its associated regulations to cross the border outside of a port of entry as long as the person presented themselves to a Canada Border Services Agency officer without delay and STCA did not apply to claims outside of a port of entry, it was possible for persons otherwise ineligible to make a claim after crossing irregularly. In some cases, these refugees have received amputations due to frostbite and concerns have been raised that some refugees may freeze to death on their way across the border. This loophole was closed after the expansion of the STCA in 2023 which made asylum seekers not eligible to make an asylum claim within 14 days of entering Canada from the US along the land border.
 Julie Taub, an immigration and refugee lawyer, claims that, since the introduction of the Agreement in late 2004, the Canada Border Services Agency has lost its capacity and would be "overwhelmed" if the agreement were repealed.
 From January 2017 to March 2018, the RCMP intercepted 25,645 people crossing the border into Canada outside official border checkpoints. Roxham Road near the route between Plattsburgh, New York and Montreal saw the most crossings and became a proxy name for this trend.[citation needed] Public Safety Canada estimates another 2,500 came across in April 2018 for a total at just over 28,000. As of early 2019, over 40,000 people crossed into Canada from the United States since early 2017.
 Roxham Road was shut down months after the expansion of the STCA in 2023.
 On the Canadian side, the STCA has been challenged on the grounds that lack of safety laws to protect refugees in the United States gives refugees legitimate grounds to cross over to Canada for a better life. On December 29, 2005, a group of refugee and human-rights organizations (both in Canada & the U.S.) instigated a legal challenge of the U.S.'s claim as a third safe country for refugees seeking asylum. This legal challenge was supported by prominent figures such as Judge Michael Phelan of the Federal Court of Canada on November 29, 2007, and many others.
 Canada's Federal Court ruled on July 22, 2020, that the Safe Third Country Agreement was invalid because it infringes on the rights of asylum seekers, specifically rights guaranteed under section 7 of the Canadian Charter of Rights and Freedoms to "life, liberty, and security of the person." As when enforcing STCA, the refugees returning to the US are detained and imprisoned there, which is a “foreseeable” consequence of Canada's actions. The decision was suspended for six months to allow time for the Parliament of Canada to respond by changing legislation or for the government to appeal the decision. The decision was stayed again on October 26, 2020, by the Federal Court of Appeal to allow time to hear the case. The appeal was granted by the Federal Court of Appeal in April 2021, overturning the earlier Federal Court decision and upholding the STCA as constitutional. 
 On June 16, 2023, the Supreme Court of Canada found that Canada's participation in the agreement did not violate section 7 of the Charter, but sent the case back to Federal Court for review of whether it might violate section 15.