PARIS — He was a proud gay man and a committed policeman.
Xavier Jugelé, 37, a Paris police officer since 2010, himself fell victim to terrorism Thursday evening. He was in a police vehicle on the heavily guarded Champs-Élysées, Paris’s most famous boulevard, when a gunman opened fire, killing him and wounding two other officers, along with a bystander.
The gunman was shot dead as he tried to flee; the Islamic State claimed responsibility for the attack a short while later.
Officer Jugelé was mourned on Friday by friends and fellow officers.
“He was a simple man who loved his job, and he was really committed to the L.G.B.T. cause,” said Mickaël Bucheron, president of Flag, a French association for lesbian, gay, bisexual and transgender police officers. “He joined the association a few years ago, and he protested with us when there was the homosexual propaganda ban at the Sochi Olympic Games.”
The son of a former member of the armed forces, Officer Jugelé was born on May 2, 1979, in Bourges and grew up in Romorantin-Lanthenay in central France. He was in a civil union. He and his partner did not have children.
Before 2010, Officer Jugelé was part of the Gendarmerie, one of the two national police forces. He recently had farewell drinks with colleagues because he was set to leave the Paris force and join the Judicial Police, an agency that pursues suspects and serves search warrants, among other functions.
“He was aware of the risks of the job and the terrorist threat, although we did not speak a lot about it,” Mr. Bucheron said. “He was a great man and friend; it is a big shock for us.”
Officer Juglé joined protests against Russia’s ban on “homosexual propaganda” before the 2014 Olympics. He also went to Greece to help police officers deal with migrants who had crossed the Aegean Sea and were seeking shelter in the European Union.
Yves Lefebvre, secretary general of the police union Unité S.G.P. Police-Force Ouvrière, said that Officer Jugelé had been known for his professionalism and as “an excellent colleague.”
President François Hollande of France, speaking from the Élysée Palace on Thursday evening, said that an official tribute would be paid to Officer Jugelé in the coming days.
Matthias Fekl, the French interior minister, visited the hospital where the two wounded police officers were being treated and expressed his support on Twitter for their relatives.
Mr. Fekl added that flags at police stations would be flown at half-staff in tribute.
France has been under a state of emergency since the attacks of November 2015 in and around Paris, which included the assault on the Bataclan that left 90 people dead.
“Glad the Bataclan is reopening. It’s symbolic,” he said. “We’re here tonight as witnesses. Here to defend our civic values. This concert’s to celebrate life. To say no to terrorists.”
He added: “It doesn’t feel strange, it feels important. Symbolic.”
Police and security officers have been especially concerned after a string of attacks targeting law enforcement officials:
■ Three police officers — Franck Brinsolaro, Clarissa Jean-Philippe and Ahmed Merabet — were killed in attacks on the satirical newspaper Charlie Hebdo, on a Jewish grocery store and in a Paris suburb in 2015.
■ A year later, officers fatally shot a man who was wielding a cleaver and yelling “God is great” as he tried to attack a police station in northern Paris.
■ In June 2016, a Paris police captain, Jean-Baptiste Salvaing, was fatally stabbed at his home, along with his longtime partner, Jessica Schneider, a civil servant, who was killed as the couple’s 3-year-old son watched. The attack took place in Magnanville and was claimed by the Islamic State.
■ In February, a man armed with two large knives and shouting “God is great” lunged at a military patrol near an entrance to the Louvre. He was shot.
■ In March, a gunman was shot dead by a military patrol at Orly Airport, south of Paris, after he attacked a soldier, prompting a partial evacuation of the airport.
In response to the attack in Magnanville, France eased gun restrictions to allow off-duty police officers to carry their side arms, even when the nation is not under a state of emergency.
The 10,000 soldiers who have been deployed across France since January 2015 to secure crowded or sensitive areas have also been targeted over the past few years, often by lone assailants who were inspired by radical Islamist propaganda but had no connections to wider networks.
Correction: April 21, 2017
An earlier version of this obituary misstated the year that Officer Jugelé was born. It was 1979, not 1970. The obituary also misspelled the first name of the president of the Flag association. He is Mickaël Bucheron, not Mikaël.