A 66-year-old retiree, upset over losing a lawsuit related to his Social Security benefits, opened fire in a Las Vegas federal-courthouse lobby Monday morning, killing one person and wounding another in a chaotic shootout.

LAS VEGAS — A 66-year-old retiree, upset over losing a lawsuit related to his Social Security benefits, opened fire in a Las Vegas federal-courthouse lobby Monday morning, killing one person and wounding another in a chaotic shootout.

The gunman, identified by law-enforcement sources as Johnny Lee Wicks, died from gunshot wounds after fleeing across the street as court officers returned fire.

Stanley W. Cooper, a 72-year-old court security officer, was killed in the gunbattle. A wounded deputy U.S. marshal, 48, was in stable condition at a hospital. His name was not released.

In 2008, Wicks, who had moved from California to a local retirement home, filed a complaint against a regional Social Security Administration commissioner, alleging his monthly benefits had been reduced by $317 because he was black.

“It’s all about race,” he wrote in the complaint, although he cited no evidence. “I am no fool.”

A lawyer for the Social Security Administration responded in court documents that Wicks’ payments had been cut because, as a Nevada resident, he was no longer entitled to a supplement he had received while living in California. The lawyer also said Wicks had not taken advantage of Social Security’s system of appeals.

A judge threw out Wicks’ case in September.

Sen. John Ensign, R-Nev., told reporters the gunfight brought to mind an incident in 1996, when a man, in an apparent suicide attempt, shot himself in the chest outside the Las Vegas office of Sen. Harry Reid, D-Nev. The man was convicted of stalking.

After the incident, Reid moved his office from south of downtown to a federal building, he has said, because it had security guards.