Attorneys for a Mexican migrant who assaulted a Laredo Sector Border Patrol agent told the court he believed the agent was a cow at the time. He assaulted the agent with a flashlight.

A federal judge in Laredo, Texas, sentenced 39-year-old Melecio Lopez-Hernandez, an illegal alien from Mexico, to more than five years in prison for assaulting a U.S. Border Patrol agent on a ranch near Freer, KVUE reported. The community is located about 60 miles from the Texas-Mexico border.

The NBC affiliate reported that Lopez-Hernandez was walking through the brush on a ranch to circumvent a Border Patrol checkpoint. A Freer Station agent came upon the man and attempted to place him under arrest. Lopez-Hernandez resisted and dislodged a flashlight clipped to the agent’s belt.

Evidence presented in court shows that the Mexican national verbally threatened the agent with the flashlight and then began striking him.

Court records revealed the incident took place on February 7, 2019. A records check revealed a previous deportation in August 2017. Additional court records show the man was also deported in December 2005 after being apprehended in Duval County, Texas. The Mexican national pleaded guilty to illegal re-entry after removal and the court sentenced him in October 2016 to 21 months in federal prison. Immigration officers removed him again to Mexico on August 28, 2017.

At trial, the defendant’s attorneys attempted to convince the court that Lopez-Hernandez did not mean to assault a Border Patrol agent. Instead, they claimed Lopez-Hernandez mistook the agent for a cow. “The judge was not persuaded,” KVUE reported.

If the migrant had been convicted again for illegal re-entry after removal, a federal felony, he could have received up to 20 years in prison.