McALLEN, Texas — A man with an assault rifle fired dozens of rounds at federal agents and a U.S. Border Patrol facility in Texas on Monday, injuring a police officer, before authorities shot and killed him.

Authorities identified the shooter as Ryan Louis Mosqueda, believed to be 27, who they said shot at agents exiting the building, which is near the U.S.- Mexico border. McAllen Police Chief Victor Rodriguez said Mosqueda had a “utility vest” in addition to the rifle when federal agents returned fire.

Hours before the attack in McAllen, Mosqueda’s father was stopped by Weslaco police for a traffic violation, according to police spokesperson Heriberto Caraveo. The father told police that he was looking for his son, who he said had psychological issues and was carrying weapons in his car, Caraveo said.

After Mosqueda was killed, law enforcement found other weaponry, ammunition and backpacks inside the vehicle.

“There are many, many more rounds of ammunition in his backpack,” Rodriguez said.

— The Associated Press