CHICAGO — The Minnesota transit cop who set into motion the deportation of an undocumented immigrant after inappropriately questioning him about his immigration status on a public train is still working as a full-time officer at a neighboring police department, said the local police union.

Officer Andy Lamers came under fire after a viral video showed him asking a metro train rider if he was “here illegally.” He was not fired but resigned from the Metro Transit Department in the middle of an internal investigation into the incident, said Sean Gormley, executive director of Law Enforcement Labor Services in statement on Wednesday.

"Officer Lamers was not terminated by the Metro Transit for any policy violation," he said. "In fact, Officer Lamers resigned on his own accord, in part to try to spare Metro Transit from further scrutiny. He regrets the attention this issue has brought to his fellow officers at Metro Transit."

Lamers, who was working part-time as a transit officer, is still a full-time officer "in good standing" at the New Hope Police Department, Gormley added.

New Hope, Minnesota, is about 17 miles from Minneapolis.

Related: Man Charged With Fare Evasion Faces Deportation After Officer Questions Immigration Status

After inquiring about his legal status, Lamers arrested Ariel Vences-Lopez for not paying the $1.75 train fare, as well as for obstruction and providing a fictitious name.

The officer also used a stun gun on the man after he "stood up and refused requests to sit," according to an incident report.

Shortly after his arrest, immigration officials detained Vences-Lopez and judge issued an order of removal.

He is scheduled to be deported on June 6, said his immigration lawyer Danielle Robinson Briand.

"He knows what happened to him was unjust, but he resigned to it," she said.

"He's still in a state of shock. It happened so quickly," she added. "But he’s happy that so many people are supporting him."

The state of Minnesota does not allow undocumented immigrants to obtain driver’s licenses, so they rely on buses and trains to get around, she said.

"Department of Homeland Security officers are exploiting this vulnerability and are staking out public transportation to round people up," she said. "And now we know that transit officers are also acting as immigration officials."

"These individuals are damned if you do and dammed if you don't," she said.

Vences-Lopez, who came to the U.S. in 2013 from Mexico, was working for a roofing company, she said.

He was previously cited for driving without a license, which led to his removal order, she said.

Metro Transit Police Chief John Harrington slammed Lamars in a statement last week, saying his actions were "not reflective of, nor does it represent, the practices and procedures of Metro Transit officers."

Harrington said department policies make clear that its officers will not act as immigration officers.

He added that there were no references to immigration status in the police report, and the department did not notify ICE or any other agency about immigration-related concerns.

"The objective of our police force is to be a community partner, and to protect the safety and security of all members of our community. I believe we had an officer make a serious mistake," he said.

Adrianna Cerillo, who is with the Minnesota Immigrant Rights Action Committee, called it “ a clear case of racial profiling."

"Andy Lamers resigned before an internal investigation could be complete because the outcome of that investigation would probably have led to his termination or some other outcome," she said. "So he quietly left like nothing happened."

"This incident was recorded, so now there is evidence. But this has happened a lot before but there was no video so no proof," she said.

Several local immigrant rights groups have mobilized around Vences-Lopez and are fighting to keep him in the country.

They are also trying to put pressure on the city of New Hope to terminate Lamers.

The organization Communities United Against Police Brutality is spearheading a rally on June 12 in front of the New Hope City Hall. The group, which has raised $2,000 for Vences-Lopez’s bond, is also encouraging constituents to call the city to demand Lamars be fired.

"It's not okay to have an officer who engages in ethnic profiling in any department," said Michelle Gross, the executive director of Communities United Against Police Brutality. "It doesn’t matter if it didn’t happen in this department, it’s just not okay."

CORRECTION (June 2, 8:50 p.m.): An earlier version of this article misstated the name of Ariel Vences-Lopez’ immigration lawyer. She is Danielle Robinson Briand, not Danielle Robinson-Baird.