Canada’s House of Commons on Tuesday elected Greg Fergus as its new speaker, making the Liberal Party lawmaker the first Black Canadian to hold the post after the previous speaker quit over unknowingly inviting a former Nazi soldier to parliament.

The members of the 338-seat House voted for Fergus in a secret ballot. Fergus came ahead of candidates including fellow Liberal MP Sean Casey, Conservative Chris d’Entremont and Green Party leader Elizabeth May.

“Today you’re the first Black Canadian to become speaker,” Prime Minister Justin Trudeau said. “It should be inspiring for all Canadians, especially younger generations who want to get involved in politics.”

The House speaker is meant to be an impartial arbitrator of parliamentary procedure, seeking to maintain order and decorum during debates. The speaker votes only to break a tie, and plays a ceremonial role as an institutional representative of parliament.

Former speaker Anthony Rota, a member of the governing Liberal party, resigned last week. He took full responsibility for inviting Yaroslav Hunka, 98, a Polish-born Ukrainian who served in one of Adolf Hitler’s Waffen SS units during World War Two, to the House when Ukrainian President Volodymyr Zelenskiy spoke on September 22.

Without knowing Hunka’s full background, Rota publicly recognized him as a veteran soldier for Ukraine and a hero who had emigrated to Canada, prompting Prime Minister Justin Trudeau to formally apologize for the gaffe last week.