A Virginia Beach police officer who shot and killed a Black man in March during a chaotic night of violence on the city’s oceanfront claims Donovon Lynch pointed a gun in his direction before the officer opened fire, according to a new legal filing.

Officer Solomon Simmons contends that the shooting of the 25-year-old was lawful and that he feared for his life, according to his response to a lawsuit filed by Lynch’s family. The slaying in the city’s popular nightlife strip on March 26 stirred protests and generated national media attention.

Simmons encountered Lynch as the officer was responding to a shooting that had just occurred, according to the filing. Simmons heard what sounded like the slide of a handgun putting a bullet in the chamber and turned and saw Lynch crouching behind some shrubbery, according to the filing, which is at odds with an account from a friend of Lynch who was at the scene.

Simmons called out, and Lynch turned and rose with a handgun pointed in the officer’s direction, according to the filing. Simmons says he then opened fire, striking Lynch twice. Lynch died a short time later.

“We all agree that this was a tragic incident and Officer Simmons has nothing but genuine sympathy for the family of Mr. Lynch,” Gary A. Bryant, an attorney for Simmons, wrote in an email. “However, under the circumstances of the encounter with Mr. Lynch Officer Simmons’ conduct was reasonable.”

The account in the filing is the first provided publicly by Simmons, who has not spoken about the shooting. It differs on many key points from one given to The Washington Post by a friend of Lynch, who was walking with him that night.

Darrion Marsh said in an interview last month that he did not see Lynch pull out a gun before he was shot and that Simmons opened fire without warning as Marsh and Lynch retreated to their car following two earlier shootings that left one dead and eight injured.

Marsh said he and Lynch had gone out for a night on the town and were not involved in the earlier violence. Marsh said his friend did have a handgun that night that he was legally allowed to carry, but it remained in his pocket.

The Virginia Beach police, who have yet to identify Simmons as the officer who shot Lynch, said two officers have told investigators that Lynch was brandishing a gun before he was shot. They said they recovered a gun from the scene of the shooting.

The police said the officer who shot Lynch did not activate his body camera for reasons that are still being probed. In his response to the lawsuit, Simmons’s attorneys say he failed to turn the camera on “because from the time he left his police cruiser to the time of Mr. Lynch’s shooting there existed the threat of deadly force on which Officer Simmons’ attention was focused.”

Lynch’s father last month filed a federal lawsuit against the city of Virginia Beach and Simmons. The lawsuit contends Lynch was not a threat at the time he was shot, and the suit is seeking $50 million in compensation.

Virginia Beach had previously filed a motion in federal court in the Eastern District of Virginia asking that the lawsuit be dismissed, arguing that the claims were too vague.

An attorney for Lynch’s family did not respond to a request for comment on Simmons’s account. The shooting of Lynch remains under criminal investigation by the Virginia State Police.