The agent, 39-year-old Matthew Bowen who was stationed in the border town of Nogales, faces up to $100,000 in fines and could spend a year behind bars. Bowen, who came under scrutiny for sending racist text messages about migrants , also resigned from U.S. Border Patrol as part of a plea deal with prosecutors, The New York Times reported .

An Arizona Border Patrol agent who intentionally struck a Guatemalan migrant with his truck in 2017 — allegedly almost running him over — has pleaded guilty to a misdemeanor charge for violating the man’s rights.

In court, prosecutors cited texts sent from the agent weeks before the incident, in which he referred to migrants as “mindless murdering savages,” “tonks,” “shitbags,” and “subhuman shit unworthy of being kindling for a fire.” https://t.co/WHHT2n0yPG

Bowen was charged last year for hitting 23-year-old Antolin Lopez Aguilar, an undocumented immigrant from Guatemala, with his Border Patrol truck and then allegedly falsifying his report about the incident.

Prosecutors say Bowen, a 10-year Border Patrol veteran who was indefinitely suspended from the agency following his indictment, came “within inches of running Lopez-Aguilar over.” The migrant reportedly suffered abrasions on his right hand and both his knees after being struck by the vehicle.

In making their case against Bowen, prosecutors cited a trove of racist and derogatory text messages exchanged between the agent and his Border Patrol colleagues in which Bowen referred to migrants as “disgusting subhuman shit” and “mindless murdering savages.”

Bowen’s attorney claimed at the time that the inflammatory language was “commonplace throughout the Border Patrol’s Tucson Sector, that it is part of the agency’s culture.”

The Arizona Republic, quoting court documents detailing Bowen’s plea agreement, said the agent had admitted to “intentionally” striking Lopez-Aguilar with his truck.

“During my apprehension of [Lopez-Aguilar], I intentionally struck him with an unreasonable amount of force. My actions ... were not justified and violated his rights protected by the Constitution of the United States,” Bowen said.

The agent is scheduled to be sentenced on Oct. 15 for willfully depriving the rights of a person under color of law. As part of his plea deal, prosecutors agreed to dismiss a second charge against Bowen for allegedly lying to investigators.

A Border Patrol spokesman would not comment on the plea deal, the Republic reported, but confirmed that Bowen had tendered his resignation last week.