Mourners gathered Thursday to pay their respects to three of the six men slain in a terrorist attack in Quebec City.

Thousands of people lined up outside the Maurice Richard Arena on Thursday morning, then silently filed inside as the doors opened.

Many said they did not know the victims, but had to make an appearance to pay tribute.

"As a member of the Muslim community it's very important for me to be present here, to show my support, my respect to the families that have been touched by this atrocity," said one man.

A female student came to the arena as a way to deal with the shock of the murders.

"I decided I really need to come here to feel better after all this. It's so terrible," she said.

The service for Khaled Belkacemi, Abdelkrim Hassane, and Aboubaker Thabti began with readings from the Koran and speeches from Prime Minister Justin Trudeau, Premier Philippe Couillard, and the mayors of Quebec City and Montreal.

Trudeau said Canada is standing behind the Muslim community.

"It is with a heavy heart that we come together this afternoon to grieve the loss of these innocent lives. But as a community and as a country, together we will rise from this darkness stronger and more unified than ever before. That is who we are," he said.

"They were sons and brothers and uncles -- like me, like us," added Couillard. "Friends, coworkers, like us. They were us. They were loved, appreciated, respected, and they always will be. We won't forget them... I want to tell Muslim Quebecers: you're at home here, we are all Quebecers," he said.

Coderre also took the podium, to add: "The time has come to ensure that after these tragic and terrible events, that we will combat all extremism in any form and that we will be there for all citizens and protect their fundamental freedoms -- freedom of religion and conscience -- so that anyone can fulfill their destiny in safety and security."

Members of the Quebec Islamic Cultural Centre also delivered eulogies to the slain.

Mohamed Yangui, president of the Islamic Centre of Quebec, spoke of how the province has been unified in this tragedy, stressing the need for greater understanding of Muslims.

"They must understand that we as Muslims, as moderate Muslims, we are not terrorists," he said.

Another ceremony is expected in Quebec City on Friday for the three other men.

The bodies of five men are being flown back to their countries of birth, in accordance with their families' wishes.

The six men died Sunday when a gunman walked into the mosque and opened fire.

Alexandre Bissonnette, 27, is charged with six counts of 1st degree murder and five counts of attempted murder.

With files from Sidhartha Banerjee of The Canadian Press