A refugee from Syria prays after arriving on the shores of the Greek island of Lesbos aboard an inflatable dinghy across the Aegean Sea from Turkey. (Angelos Tzortzinis/Agence France-Presse via Getty Images)

WHEN THE photo appeared Sept. 2 of Alan Kurdi, a lifeless 3-year-old boy facedown on a beach, the plight of refugees from Syria’s civil war shocked the world. In Canada’s election campaign, rivals responded with pledges to accelerate their resettlement. The election winner, Justin Trudeau of the Liberal Party, outlined the most ambitious agenda, to bring 25,000 refugees to Canada by year’s end. Mr. Trudeau has extended the deadline eight weeks out of prudence over the logistical challenges. It is a small adjustment to a generous response that serves as a rebuke to the senseless xenophobia heard lately in the United States, and that should serve as a model.

Canada has long welcomed refugees and immigrants. A timeline published by the government shows an amazing parade of beneficiaries: waves of Poles, Italians, Jews and Ukrainians in the first half of the last century; a quarter-million displaced persons from Europe fleeing Nazis and Communists in World War II; 37,000 Hungarians in 1956; 11,000 from Czechoslovakia in 1968 and 1969, fleeing the Soviet and Warsaw Pact invasion; 60,000 boat people from Vietnam; and Kosovars, Bhutanese and others in more recent years. On top of this, the country is a crazy quilt of immigrant communities that are diverse, vibrant and a source of national strength.

In the latest wave, Canada will accept 10,000 Syrian refugees by year’s end and the remaining 15,000 by the end of February. The arrivals are coming from camps in Jordan, Lebanon and Turkey. Canada’s plan is impressive: resettling them to 36 cities, 13 in Quebec and the rest across the country; temporarily lodging 6,000 on military bases in Ontario and Quebec; and flying the refugees to Canada largely on privately chartered aircraft but promising military airlifts every 48 hours if needed.

Contrast this alacrity with the cold-shouldered hostility that has been ricocheting around the United States. Michigan Gov. Rick Snyder, a Republican who had described himself as the most pro-immigration governor in the country — and in September said of accepting Syrian refugees, “Isn’t that part of a being a good Michigander?” — slammed on the brakes after the Paris terrorist attacks. He announced he was suspending the state’s effort to bring refugees from the Middle East to Michigan, where there is a large Arab American population. On Nov. 20, 27 Republican governors (although not Mr. Snyder) wrote to President Obama asking him to suspend resettlement of Syrian refugees. The president wisely defended the plan to bring them to the United States, pledging that the country will take 10,000 next year. It is a start — but more could be done.

When people flee war and upheaval, they reach North American shores with immense gratitude and eagerness to succeed in their new home. Properly screened, very few ever pose a security problem. Canada is showing the way, with compassion and sound judgment. The United States could use more of both.