(CNN) -- A man who lost a recent Social Security claim opened fire with a shotgun in a federal courthouse Monday, killing a court security officer and injuring a deputy U.S. marshal, authorities said.
Law enforcement officials speaking on condition of anonymity identified the man as Johnny Wicks, a Las Vegas resident. The FBI said the black-clad man walked into the lobby of the Las Vegas federal courthouse, pulled a shotgun from underneath his jacket and began shooting.
The shootout ended after federal marshals chased Wicks out of the courthouse and across the street, where he was shot and killed. He died among the bushes in front of an old school that once housed a temporary police headquarters.
"There had to be close to 40 gunshots, if not more," said Troy Saceal, who was parking in a garage near the courthouse when the shooting broke out. "I started seeing officers coming down Las Vegas Boulevard actually shooting, and what looked to me as someone was hit up by the front of the building by gunfire."
A one-minute, 13-second video clip posted on the Web site YouTube includes at least 45 gunshots, many in rapid succession. Nicholas Gramenos, who recorded the clip, said he was leaving the courthouse when the shooting erupted.
Another witness, Bobby Scottland, told CNN the shots "sounded like popcorn." He said he passed the suspected gunman shortly before the shooting broke out.
"He didn't look disturbed, from what I saw -- if that is the gentleman," Scottland said. "You know, nothing would have given me a second thought that what was about to happen happened."
Wicks filed a discrimination claim against Social Security in 2008, alleging he was denied full benefits because of his race, according to court papers. A federal judge ruled against him in September.
A law enforcement official said Wicks set fire to his residence before the shooting, and surveillance video indicates he was a lone gunman with no accomplices.
The deputy marshal and the security officer were taken to a hospital, where the security officer, Stanley W. Cooper, died, said U.S. Marshals spokesman Jeff Carter. Cooper, an employee of Akal Security, had been a contracted court security officer with the U.S. marshals in Las Vegas since 1994, Carter said.
He spent 26 years with the Las Vegas Metropolitan Police.
The deputy marshal, who was not named, was listed in stable condition; Dickey told reporters he was in "good shape."
The nine-floor Lloyd D. George Federal Courthouse was evacuated after the shooting, which broke out about 8 a.m. (11 a.m. ET).
Employees were let back into the building to get their belongings, but the building remained closed Monday afternoon. Cones were scattered across Las Vegas Boulevard on Monday evening, with each representing a slug or shell casing from the gun battle.
The building also houses the local offices of Nevada Sens. John Ensign and Harry Reid. Neither senator was in the building at the time, although Ensign told reporters he went there upon hearing reports of the shootings.
Ensign said it was his understanding the gunman never made it past security at the courthouse, saying the security there is "outstanding." The officer who died took a "direct hit" from the shotgun, he said, while the deputy marshal was shot in the arm.
Reid, the Senate majority leader, issued a statement saying his thoughts were with the victims and their families. "The law enforcement personnel who protect the courthouse put their lives at risk every day to keep the people who are inside safe, and I greatly appreciate their service," the senator said.
U.S. Marshals Service director John F. Clark said in a statement, "I can receive no news more grim or sobering than word of a line-of-duty death or injury to our U.S. Marshals personnel ... Rest assured, the brave and immediate actions of these two individuals saved lives by stopping the threat of a reckless and callous gunman who had no regard for who or how many victims were struck down by his senseless actions. They are heroes."
CNN's Ed Henry, Dana Bash, Lynn Lamanivong, Chuck Johnston, Sara Pratley and Carol Cratty contributed to this report.