The sweeping victory of Justin Trudeau in Canada’s elections on Monday shows how ready Canadians were to emerge from a decade under the Conservative government of the secretive and combative Stephen Harper. Mr. Trudeau clearly benefited from voters’ memories of his father, Pierre Elliott Trudeau, who rose to power 47 years ago on a platform of liberal reforms and a wave of personal popularity that came to be dubbed “Trudeaumania.” To those memories, Justin Trudeau, 43, added his own charisma and the promise that, as prime minister, he would return Canadians to the tradition of liberal and humanitarian values that his father championed.

In his nearly 10 years in office, Mr. Harper pursued a conservative agenda of lowering taxes, cutting government programs and taking a tough line on security, including the passage of broad antiterrorism laws. His government also banned women from wearing face coverings at citizenship ceremonies.

Mr. Trudeau, by contrast, has pledged, among other things, to legalize marijuana, revise the antiterrorism laws, stop the purchase of F-35 fighter jets from the United States and end Canada’s combat role in the American-led fight against the Islamic State. While both men backed the Keystone XL oil pipeline, Mr. Trudeau is open to addressing environmental concerns. To many voters, that was the major appeal of Mr. Trudeau — that he would return the Liberal Party, and Canada, to the country’s core values, like a generous safety net, active participation in international organizations like the United Nations, a humanitarian foreign policy and an inclusive concept of nationhood. Mr. Harper’s conservatism was at odds with that identity.

For the Liberals, the election was a stunning reversal of years of sagging fortunes. In the Harper years, the party had lacked a dynamic leader and was eclipsed on the left by the New Democratic Party, which relegated the Liberals to No. 3 in Parliament after the 2011 elections. This time the Liberals soared from 34 seats to 184 in the 338-seat Parliament, while the Conservatives shed 60 seats and the New Democrats lost 59. The difference was Mr. Trudeau.