An openly gay officer who fought for change was among the victims of a sniper attack in Dallas during a protest march against police violence.

Authorities said that five officers were killed and seven others injured. Two civilian protesters were also wounded in the attack.

The gunman, identified by police as 25-year-old Micah Xavier Johnson of Mesquite, Texas, died when the police bomb squad sent in a robot after hours of negotiations failed.

According to the AP, Dallas Area Rapid Transit (DART) officer Jesus Retana was among the wounded.

Retana, a ten-year veteran of the agency's force, lobbied for and helped win benefits for same-sex partners of DART employees.

Retana fought for the benefits after his husband, Andrew Moss, became too ill to work.

The 39-year-old officer is reportedly at home recovering from unspecified injuries.