MONTREAL — A gunman opened fire in a residential neighborhood in the Canadian city of Montreal on Monday, prompting a shootout with police that killed at least three people, sent families running for cover and paralyzed the city for hours.A police officer, a civilian and the armed assailant were among the dead, according to the police. Another police officer was severely injured and was reportedly in stable condition.The brazen midday shooting, which law enforcement sources believe was a targeted attack on police, marks the first time a Montreal officer has been killed in the line of duty in two decades.The unidentified male suspect, who is believed to have acted alone, was shot and killed right away, the city's police chief said. The attack unfolded in after 11:30 EDT (15:30 GMT) in Côte-des-Neiges, the most populated neighborhood in Montreal. A witness saw a "gun sticking out of a window", heard shots and called police, investigators said.The rash of gunshots shocked residents of the neighborhood, who remained under an hourslong order to take shelter and lock their doors as authorities investigated an “armed and dangerous suspect.”Traffic in a nearby busy motorway was brought to a stop and local metro service was halted.Quebec's security minister said the motive was unclear. "For now, we don't really know what the motive of this individual was," Ian Lafrenière.After the attack, the Royal Canadian Mounted Police (RCMP) sent an alert to other police forces in Canada, the Globe and Mail newspaper reported. The bulletin is said to have warned about a document that had been circulating which allegedly encouraged citizens to shoot police officers.Police are examining a so-called manifesto that runs over 100 pages they believe may have been written by the gunman. It reportedly espouses incel ideology, according to law enforcement sources. Incel is short for “involuntary celibate” and its misogynistic ideology has been tied to several violent attacks in recent years.One of Canada's most deadly mass killings, a 2018 vehicle-ramming in Toronto that killed 10, was connected to "incel" ideology.Monday's incident marked the first time a Montreal police officer had been killed in the line of duty in nearly a quarter of a century.Becoming emotional during a press conference, Montreal Police Chief Fady Dagher told reporters: "It's a nightmare."The police department later named the officer who was killed as Mohamed Lamine Benredouane, 34. He had been part of the force since 2021.The department said it would fly its flags at half staff in his honor, adding that Benredouane would be remembered for his hard work, professionalism and dedication to his job.The civilian killed in the attack was named by the Centre for Israel and Jewish Affairs as Michael Moshe Mizrahi, "a beloved member of Montreal's Jewish community".The Canadian advocacy group posted on social media that Mizrahi was "an innocent victim of today's events". Police have not said that it was an antisemitic attack.