– It started as an apology for a shameful chapter in Canadian history and ended with an urgent call to fight anti-Semitism here and now.

Last week, Canadian Prime Minister Justin Trudeau made a long-planned apology for the government's 1939 decision to turn away the M.S. St. Louis, an ocean liner carrying more than 900 German Jews fleeing Europe.

His speech, just over a week after the massacre at Tree of Life synagogue in Pittsburgh, showed how anti-Semitism shaped Canada's response to Jewish refugees fleeing Germany.

"Today, I rise in this House of Commons to issue a long overdue apology to the Jewish refugees Canada turned away," he said in Ottawa. "We used our laws to mask our anti-Semitism, our antipathy, our resentment. We are sorry for the callousness of Canada's response. And we are sorry for not apologizing sooner."

Since taking office, Trudeau has delivered several high-profile apologies, so many that he's faced the very Canadian charge of apologizing too much. Critics wonder what work it does, who benefits and whether saying "sorry" is ever really enough.

But coming in the wake of what may be the deadliest attack on Jews in American history, at a time when anti-Semitic memes and conspiracy theories are bursting into the populist mainstream, his remarks felt urgent.

The apology connected past to present, showing how the hate that animated Canada's treatment of Jewish refugees is still ingrained in contemporary politics in Canada, the U.S. and elsewhere.

Trudeau said 17 percent of all hate crimes in Canada target Jewish people.

"Holocaust deniers still exist," he said. "Anti-Semitism is still far too present. Jewish institutions and neighborhoods are still being vandalized with swastikas."

He condemned the attacks in Pittsburgh as a "heinous anti-Semitic act of violence."

The story of the M.S. St. Louis has long been a source of shame for a country that likes to think of itself as a refuge.

In May 1939, just months before the outbreak of war, an ocean liner left Europe with more than 1,000 passengers on board, including 907 German Jews. The boat made it to Cuba, but the Jewish refugees were not allowed to disembark. The United States later turned them away.

With the ship days from Halifax, the Canadian government decided not to help. The boat was sent back to Europe and 254 of those on board died in the Holocaust.

Canada's rejection of the St. Louis was not an isolated incident. When it came to Jewish immigration, Canada's policy at the time was "none is too many."

"Of all the allied countries, Canada would admit the fewest Jews between 1933 and 1945. Far fewer than the United Kingdom and significantly less per capita than the United States," Trudeau said.

When the possibility of an apology for the M.S. St. Louis surfaced, some members of the Jewish community expressed concern that a decades-late apology for the ship would be too little, too late.

Writing in the National Post on the eve of the apology, Michael Mostyn, chief executive of B'nai Brith Canada, called on the Trudeau government to take action by devoting resources to developing a national action plan to combat anti-Semitism and engage with Jewish institutions, including synagogues, on security.

"The Jewish community needs committed and concerted action on the part of government to combat the rising tides of anti-Semitism so that, hopefully, there will be no need for apologies in the future," he said.