(CNN) The Orlando police officer who first exchanged fire with the Pulse nightclub shooter is being sued in federal court by survivors and family members of nine victims.

Officer Adam Gruler, along with 30 unnamed police officers, and the city of Orlando are accused of violating the civil rights of the club's patrons, according to a suit filed Thursday in US District Court for the Middle District of Florida.

In the lawsuit, survivors and family members say some officers stayed outside the club as the massacre took place and others detained uninjured survivors who were running away from gunfire, preventing them from calling their loved ones.

Omar Mateen killed 49 people and injured more than 50 others in June 2016 when he opened fire at the Orlando nightclub. Gruler, who worked extra duty as security for Pulse, heard gunshots and engaged in a gunbattle with Mateen after the shooting began, police said.

Once Gruler felt outgunned, police had said, he retreated from the club and called for assistance.

Read More