Law enforcement officials on Friday arrested an Immigration and Customs Enforcement agent accused of shooting a Venezuelan immigrant this year and lying about it.

The agent, Christian J. Castro, 52, was caught in Texas after investigators from the Minnesota Bureau of Criminal Apprehension tracked him down, according to the Hennepin County attorney’s office, which had charged him this month with four counts of second-degree assault. He faces an additional charge of filing a false police report.

The shooting, on Jan. 14, set off violent protests at the height of the Trump administration’s immigration operation in Minnesota this past winter.

“Today’s arrest is a critical step forward in our prosecution of Mr. Castro,” Mary Moriarty, the attorney in Hennepin County, which includes Minneapolis, said in a statement.

Daniel Borgertpoepping, a spokesman for the office, said investigators from the Texas Rangers took Mr. Castro into custody while officials from the Department of Homeland Security’s Office of Inspector General stood by. The inspector general’s office, however, said it had played no role in the arrest.

Mr. Castro has not responded to requests for comment in recent days. It is not clear whether he has hired a lawyer.

On the evening of the shooting, Mr. Castro had a brief scuffle with Alfredo Aljorna, a Venezuelan migrant whom he had been trying to arrest after a car chase, according to court documents.

After Mr. Aljorna broke free and raced into his Minneapolis home, Mr. Castro fired a bullet into the front door, wounding Mr. Aljorna’s roommate, Mr. Julio C. Sosa-Celis, in the leg, according to state prosecutors.

That night, as violent protests erupted, Mr. Castro told investigators that he had opened fire, fearing for his life, as three men bludgeoned him for several minutes using a shovel and a broom. Based on that account, federal prosecutors charged Mr. Sosa-Celis and Mr. Aljorna with assaulting a law enforcement officer.

The case unraveled after federal prosecutors reviewed footage from a Minneapolis police surveillance camera that belied Mr. Castro’s version of events. Prosecutors dropped charges against the two Venezuelan men.

Mr. Castro was placed on leave in February, and ICE’s interim director, Todd Lyons, said Mr. Castro was under investigation for appearing to have lied under oath, a federal crime.

But ICE officials have described both the state charges against Mr. Castro and Friday’s arrest as “unlawful and nothing more than a political stunt.” In a statement on Friday, the agency added that, “This is a federal issue, and it must be handled at the federal level.”

State prosecutors have acknowledged that they face significant practical and legal hurdles because federal officials enjoy broad immunity from prosecutions stemming from conduct in the line of duty.

Mr. Castro was booked into jail in Cameron County, Texas, near the Mexico border, after he was arrested Friday morning at a house in Harlingen, said Mike Ernster, a spokesman for the Minnesota Bureau of Criminal Apprehension.

If Mr. Castro waives the right to an extradition hearing in Texas, he could be moved to Minnesota to be arraigned quickly. If he fights extradition, Gov. Tim Walz of Minnesota, a Democrat, would need to make a formal request for his extradition to Gov. Greg Abbott of Texas, a Republican.

Andrew Mahaleris, a spokesman for Mr. Abbott, did not say how the governor would handle such a request but said that federal agents perform a dangerous job enforcing immigration laws, adding that the governor would “always support those who uphold the rule of law.”

Mr. Castro is the second ICE agent Ms. Moriarty has charged with assault over incidents that occurred during the immigration operation in Minnesota.

In April, she charged Gregory Donnell Morgan Jr., an agent based in Maryland, with second-degree assault. According to a charging document, Mr. Morgan, 35, pointed a gun at motorists while driving on a state highway in February.

Mr. Morgan traveled to Minnesota last week to be arraigned and appeared before a judge, who ordered him released after he posted bail.

His lawyer, Ryan Pacyga, told reporters last week that ICE agents in the Minnesota crackdown were the targets of harassment and threats. He described his client as a dedicated officer and said a fuller account of the incident would emerge.

Mr. Pacyga said he intended to have Mr. Morgan’s case moved to federal court because he is a federal agent, a step state prosecutors have said they expected. If that happens and Mr. Morgan goes on trial, the case would unfold under unusual circumstances. State prosecutors would try the case before a federal judge and a federal jury.

Under Minnesota law, the charges Mr. Morgan and Mr. Castro face — second-degree assault with a dangerous weapon — carry a mandatory minimum sentence of three years in prison if either is convicted.

If found guilty, they could not be pardoned by President Trump for a conviction secured under Minnesota law.

Ms. Moriarty said her office has more than 30 additional open investigations involving federal immigration agents who took part in the Minnesota operation. The inquiries include the fatal shootings of two American citizens, Renee Good and Alex Pretti.

Hamed Aleaziz and Lauren McGaughy contributed reporting.