Immigration officials last week deported the spouse of a U.S. soldier killed in Afghanistan in 2010, leaving the couple's 12-year-daughter in Phoenix, then abruptly reversed its decision on Monday when the deported man was allowed to return to the U.S.

Jose Gonzalez Carranza, 30, was arrested by Immigration and Customs Enforcement officers last Monday on his way to his welding job and then deported to Nogales, Sonora, early Thursday morning, according to Gonzalez Carranza and his attorney, Ezequiel Hernandez.

Gonzalez Carranza was married to Army Pfc. Barbara Vieyra, who was killed on Sept. 18, 2010, while serving in the U.S. Army in Afghanistan. She was 22.

During an interview, Gonzalez Carranza told The Arizona Republic he was allowed to re-enter the U.S. through the DeConcini port of entry in Nogales, Arizona Monday afternoon.

He said he was then driven back to Phoenix where ICE officials dropped him off at the agency's headquarters near downtown.

ICE officials offered no explanation for the decision to allow Gonzalez Carranza to return to the U.S. But Hernandez believes the reversal was triggered by media attention the deportation received.

UPDATE: His wife died fighting for the U.S., then the U.S. deported him

Gonzalez Carranza said he was eager to see his daughter, who lives with her grandparents.

He said he had not told her he had been deported because he was afraid she would be further traumatized after the loss of her mother.

Reached by phone earlier Monday in Nogales, Gonzalez Carranza said he had been living in a shelter for deported migrants in Nogales, Mexico, a city he didn't know, and was worried about his daughter, Evelyn Gonzalez Vieyra, a U.S. citizen.

"I feel so bad," Gonzalez Carranza said. "I'm thinking about, I might never see her again."

Hernandez said it seemed cruel for ICE to inflict additional pain on the man and his daughter, noting the trauma they experienced after the death of his spouse.

"There are plenty of people you can go after but not a guy whose wife died in Afghanistan," he said.

Vieyra was mortally wounded when insurgents attacked her unit using an improvised explosive device and rocket-propelled grenade fire in Kunar Province, Afghanistan, the Pentagon said at the time. Her unit had been sent to Afghanistan as part of Operation Enduring Freedom.

Cecillia Wang, deputy legal director at the ACLU, said she could not recall a similar deportation. She said the deportation was unnecessary.

“It’s the height of cruelty for ICE to deport the father of a child whose mother died while serving in the U.S. army in Afghanistan," Wang said. "The government can exercise its discretion not to pursue deportation against the sole remaining parent of a U.S. citizen child under these circumstances."

DIAZ:ICE should've never deported husband of fallen soldier

SEE ALSO:A deported Arizona mom makes new life in Mexico but misses kids 'dearly'

Gonzalez Carranza said he came to the U.S. illegally from Veracruz, Mexico, in 2004, when he was a teenager. He said he and Vieyra married in 2007.

After his wife was killed in Afghanistan, Gonzalez Carranza was granted what is known as parole in place, which allows immigrants in the country illegally to remain in the U.S. without the threat of deportation, Hernandez said.

An immigration judge then terminated deportation proceedings against Gonzalez Carranza based on the parole in place, Hernandez said.

However, ICE refiled the case in 2018, Hernandez said.

A judge ordered Gonzalez Carranza deported in December 2018 after Gonzalez Carranza didn't show up for his court hearing, Hernandez said.

But the reason Gonzalez Carranza didn't show up is because he never received the notice, Hernandez said. He said ICE sent it to the wrong address.

Gonzalez Carranza didn't find out a judge had ordered him deported until ICE officers came to his house last Monday and took him into custody, Hernandez said.

MORE:Why Donald Trump's sanctuary cities plan faces roadblocks

Hernandez said he filed a motion to reopen Gonzalez Carranza's deportation case. The motion triggered an automatic stay of removal, but ICE deported him anyway, Hernandez said.

Wang also said it Gonzalez Carranza should not have been deported if there was a stay of removal. She said, however, it is "not uncommon" for ICE to violate stays of removal.

On Monday, Hernandez sent out a news release to draw attention to Gonzalez Carranza's case.

Hernandez said he can't understand why ICE deported him. Gonzalez Carranza has no criminal record, he said.

"This guy's wife died in action in Afghanistan," he said.

After speaking to The Arizona Republic, Hernandez said he received a call from an ICE officer who told him the agency was making arrangements to allow Gonzalez Carranza back into the United States.

Shortly after, Gonzalez Carranza was handcuffed at the border crossing in Nogales by Customs and Border Protection officers and allowed into the U.S., Hernandez said. He was then transported to CBP offices in Tucson, he said.

ICE officials then told Hernandez that Gonzalez Carranza would be transported back to Phoenix later tonight and then released on his own recognizance, Hernandez said.

ICE officials did not immediately provide information on the case, but a spokeswoman for Sen. Kyrsten Sinema, D-Ariz., said Sinema's office had reached out to help.

“Our office is in communication with Mr. Carranza’s attorney and we will assist the Carranza family in this process," Sinema spokeswoman Hannah Hurley said in an email.

Rep. Ann Kirkpatrick, D-Ariz., decried the "un-American" immigration and border actions taken under President Donald Trump.

"I'm relieved to now learn that Mr. Gonzalez has been allowed to re-enter the states and be reunited with his daughter, but the story of his arrest is just another example of the president's inhumane immigration policies," Kirkpatrick said in a written statement.

Barbara Vieyra’s sister says family tried to keep mom's memory alive for her daughter, Evelyn

Barbara Vieyra’s sister, Guadalupe, said Gonzalez Carranza sees his daughter occasionally on weekends.

Vieyra did not know Gonzalez Carranzahad been deported until a reporter knocked on her door Monday night. She called her parents, who said they did not learn of the situation until Monday morning.

Guadalupe is one year younger than her sister and said her family does the best they can to keep Barbara’s memory alive for Evelyn.

“When she was 3, she was too young to know what happened, but now she’s almost a teenager,” she said. “We talk about it all the time. We celebrate my sister’s birthday and the anniversary of her death because we want my niece to know her mother died fighting for her country.”

Republic reporters John D'Anna, Yvonne Wingett Sanchez and Ronald J. Hansen contributed to this story.

Reach the reporter at daniel.gonzalez@arizonarepublic.com or at 602-444-8312. Follow him on Twitter @azdangonzalez. Support local journalism. Subscribe to azcentral.com today.