Portland, Ore., man was charged in a criminal complaint Friday with allegedly throwing an explosive device at the Mark O. Hatfield U.S. Courthouse.

Authorities say security cameras caught 18-year-old Gabriel Agard-Berryhill throwing an “incendiary object” into the entrance of the building near midnight on July 28, causing an explosion inside the downtown courthouse.

“No legitimate protest message is advanced by throwing a large explosive device against a government building,” U.S. Attorney Billy J. Williams said Friday. “Mr. Agard-Berryhill’s actions could have gravely injured law enforcement officers positioned near the courthouse, other protesters standing nearby, or himself.”

“I applaud the ATF agents and U.S. Marshals Service deputies who worked quickly to identify Mr. Agard-Berryhill before he had an opportunity to hurt others,” he added.

JUSTICE DEPARTMENT LAWYERS REQUEST TRO PROTECTING JOURNALISTS LIFTED, CLAIM IMPOSTORS ABUSE PROTECTIONS

The explosion started a fire inside the courthouse, prompting federal officers to collect samples of the fragments to be sent to the Bureau of Alcohol, Tobacco, Firearms, and Explosives (ATF) laboratory for analysis.

ATF further reviewed videos posted on social media and located the individual that threw the incendiary object. The man officials later identified as Agard-Berryhill was reportedly dressed in a green vest with camouflage pants and wearing a mask.

“Investigators observed the person in other protest-related videos posted online wearing the same vest and attempting to hold a shield in front of a naked woman,” a Department of Justice (DOJ) statement said Friday.

PORTLAND BUSINESS OWNER DESCRIBES 'DEVASTATING SITUATION,' SAYS 'THERE ARE NO CONSEQUENCES' FOR CRIMES

Investigators said they were able to figure out the identity of Agard-Berryhill after finding a product review on Twitter, written by a supposed relative of the assailant -- along with a picture that matched the description of the individual in the footage.

“I got this [vest] for my grandson who’s a protestor downtown, he uses it every night and says its does the job," the alleged relative wrote.

Investigators further found the same picture on Facebook and said they were able to positively identify Agard-Berryhill.

Agard-Berryhill made his first appearance in front of a U.S. Magistrate judge Friday. He has been released pending further court appearances.

He faces a mandatory minimum of five years in prison, and up to 20.

CLICK HERE TO GET THE FOX NEWS AP

“The violent opportunists engaged in dangerous acts of violence, such as arson, need to realize there will be grave consequences,” Russel Burger, a U.S. Marshal for the District of Oregon said.

“Serious crimes of this nature go beyond mere property damage to the courthouse and endanger people’s lives.”