The FBI is investigating a "targeted attack" in which shots were fired into an Immigration and Customs Enforcement (ICE) office and another facility associated with the agency in San Antonio, Texas early Tuesday.

The shooting occurred around 3 a.m. at an ICE building where two floors that housed administrative and executive offices were targeted, according to the San Antonio Express-News. The outlet reported another shooting occurred at a separate facility where an ICE contractor was located.

FBI Special Agent in Charge Chris Combs said those responsible knew what they were shooting at.

#JEWSAGAINSTICE PROTEST AMAZON'S ROLE IN 'PROFITING OFF CRUELTY,' DOZENS ARRESTED

"All of the shots that we have found are on the floors where ICE had offices," Combs said. "This is no question a very targeted attack. It's not a secret facility, you can go online, it's [the address is] out there. So they did some research, they knew what floors ICE was on, they knew what buildings they were and they hit those."

A man was detained shortly after the shooting but was released after authorities determined he was not connected to the incident.

ICE did not respond to a Fox News request for comment Tuesday.

Daniel Bible, the field office director for the agency's enforcement and removal operations in San Antonio, blamed the shooting on elected officials, the media and activists for a breakdown in political discourse that has encouraged violent acts.

“Political rhetoric and misinformation that various politicians, media outlets and activist groups recklessly disseminate to the American people regarding the ICE mission only serve to further encourage these violent acts," Bible told Fox News affiliate, KABB-TV. "ICE officers put their lives on the line each and every day to keep our communities safe. This disturbing public discourse shrouds our critical law enforcement function and unnecessarily puts our officers’ safety at risk."

The agency has been besieged by criticism from lawmakers and immigration activists as the Trump administration continues to target those living in the U.S. illegally.

CLICK HERE TO GET THE FOX NEWS APP

Last month, a man was killed by Washington state authorities when he threw incendiary devices at both an immigration center and nearby propane tanks. In Colorado, protesters demonstrating outside an ICE facility replaced the American flag with the Mexican flag.

"We are concerned that there could be additional attacks, we have to stop that," Combs said. "We can not allow political discourse to lead us to the point of violence, where federal employees, innocent people doing their jobs are put in harm's way."