One of two gunmen who shouted ‘Allahu akbar!’ as they opened fire at a mosque in Quebec City was of Moroccan origin, a witness and local media reported Monday, revealing the first details about the attackers in the massacre that killed six men.

The terror suspects were identified as Mohamed Khadir and Alexandre Bissonnette, the Canadian TV network TVA Nouvelles reported. They were arrested soon after the shooting at the Quebec Islamic Cultural Centre Sunday night and were expected to appear in court later Monday, police told reporters.

NAVY SEAL KILLED, 3 INJURED IN RAID ON AL QAEDA IN YEMEN

One of the gunmen actually turned himself in, calling 911 less than 20 minutes later and giving officers his location in d’Orleans so they could arrest him, police said. The attack unfolded in the men’s section of the mosque.

Prime Minister Justin Trudeau condemned the attack, calling it a “terrorist attack on Muslims.”

The attackers were students at Université Laval, a school in Quebec, a source close to the investigation told Radio Canada, saying one was Moroccan. Police said the suspects were not on their radar.

ISRAEL POLICE: JANUARY SHOOTING IN HAIFA WAS ‘TERROR’ ATTACK

Five people were in critical condition and 12 others suffered minor injuries, University of Quebec Hospital Centre spokeswoman Genevieve Dupuis said Monday. The dead ranged in age from age 35 to 60.

A possible motive was unclear. Police said they did not believe there were other suspects.

One of the gunmen was armed with an AK-47, the Le Soleil newspaper reported.

A witness who asked to remain anonymous told Radio Canada the two shooters were masked.

“It seemed to me that they had a Quebecois accent. They started to fire, and as they shot they yelled, ‘Allahu akbar!’ The bullets hit people that were praying. People who were praying lost their lives. A bullet passed right over my head,” the person said.

“It was with tremendous shock, sadness and anger that I heard of this evening’s tragic and fatal shooting at the Centre culturel islamique de Quebec located in the Ste-Foy neighborhood of the city of Quebec,” Trudeau said in a statement. “Muslim-Canadians are an important part of our national fabric, and these senseless acts have no place in our communities, cities and country.”

The gunfire started at the Islamic center at around 8 p.m., Le Journal de Quebec reported. More than 50 people were attending prayer service at the time of the shooting. The center’s president Mohamed Yangui said the shooters reloaded at least three times.

An unidentified man looking for his friends, who were regular attendees of evening prayers, told Le Journal de Quebec, “I’ve tried to reach them, but I cannot. It’s terrible.”

The French-speaking province of Quebec has been embroiled in a lengthy debate about race and religious accommodation. The previous separatist government of the province called for a ban on ostentatious religious symbols such as the hijab in public institutions.

The CBC reported that someone left a pig’s head on the mosque’s doorstep this past June, during the Muslim holy month of Ramadan. Islam’s holy book, the Koran, forbids them from consuming pork.

“We were told that it was an isolated act, but today we have deaths,” Yangui told reporters. “It is minutes and hours of terror and anguish.”

In the U.S., the NYPD said in a statement that officers have been told to give “special attention” to mosques in the area. Police said they were monitoring the situation in Quebec.

Fox News’ Samuel Chamberlain, Ryan Gaydos and The Associated Press contributed to this report.