Dallas - A masked gunman opened fire Monday on a federal courthouse in downtown Dallas before being fatally shot in an exchange of gunfire with federal officers, witnesses and authorities said.

Brian Isaack Clyde, 22, was pronounced dead at a hospital following the shooting outside the Earle Cabell Federal Building. Officials had nothing to indicate the presence of any other shooters or threats to the city, FBI agent Matthew DeSarno said.

Clyde opened fire on the building at about 8:40 a.m., and law enforcement immediately responded, including officers from the Federal Protective Service.

A bomb squad later examined a vehicle associated with the gunman as a precaution and performed controlled explosions, authorities said. Two loud blasts could be heard.

The Dallas Morning News reported that one of its photographers, Tom Fox, was outside the building and witnessed the shooter opening fire.

Fox said he was outside the building when a masked man parked at the corner of two downtown streets. He said the man ran and began shooting at the courthouse, cracking the glass of the door. The window panes in a revolving door were broken.

A photograph posted on the newspaper’s website showed authorities tending to a shirtless man lying on the ground in a parking lot outside the building.

Police closed off several blocks around the federal building.

Chad Cline, 46, who lives near the courthouse, told The Associated Press that a message was broadcast throughout his building shortly before 9 a.m. announcing that there was an active shooter in the area and that residents should stay inside.

Less than half an hour later, another message said there was a potential bomb threat and that residents needed to leave. He, his wife and their two dogs went to a coffee shop.