A 22-year-old man in combat gear and a mask opened fire Monday morning at a federal courthouse in Dallas and was killed in an ensuing firefight with police officers, authorities said.

Cellphone video of the 8:50 a.m. incident at the Earle Cabell Federal Building captured images of the gunman running along the side of the building, smoke from a short distance and then the suspect running into a parking lot and collapsing.

According to reports, the shooter was shot and killed by responding officers before he could injure anyone. Authorities did not release a motive for the attack but said it appeared the assailant was alone.

The FBI’s Special Agent in Charge Matthew DeSarno identified the shooter as Brian Isaack Clyde, who died at the scene.

Local outlets reported that the bomb squad was also called for a controlled detonation of the suspect’s car, and the federal building was evacuated for safety precautions.

Gillian Hughes, an assignment editor at Fox4, posted video of Clyde seemingly firing a rifle before taking cover between cars in a parking lot.

And Dallas Morning News photographer Tom Fox snapped a dramatic picture of the shooter mere feet away, outside the courthouse:

One witness told Fox4 the man emerged from a McDonald’s with the rifle, shooting at random.

“I tried to warn people and tell them there’s a guy down there shooting,” the witness, Harmon Turner, said. “When I did look back that’s how I knew he was heavily armed. He had an assault rifle. His face was kinda masked up. And when I seen that I was just in shock. I ran.”

Other witnesses said they heard up to 20 shots.

“I just started hearing rapid shooting. I was right at the door getting ready to walk in when everybody started running out,” Don Miles told NBC Dallas. “When I heard those shots, 10-15 shots going off, I just ran across the street.”

Alan Wyatt told the Fox station he looked out the window to see the gunman standing at the entrance to the courthouse.

“And he was blowing the front entrance out. There were two guards that popped out of the garage and then he then turned the gun and fired into the garage. I don’t think he hit anybody and then he just kind of took off,” he said.

Kelly Carter who lives across the street from the courthouse, told the TV station he heard the commotion and looked out his window to see police chasing the suspect.

“I could smell the gunpowder at my place, yeah it was that close,” Carter said. “I could hear ricochets going down Jackson Street.”