The convicted rapist who shot two corrections officers in Fresno, Calif., last week was an illegal immigrant who was only in the U.S. because his homeland refused to take him, federal officials confirmed Wednesday.

Thong Vang, a 37-year-old Laotian national who completed a 16-year rape sentence two years ago and was slated for deportation, instead was freed when Laotian officials did not respond to a request by Immigration and Customs Enforcement to assist in his removal.

“When Laotian officials failed to respond to that request, ICE released Mr. Vang in December, 2014 due to the Supreme Court’s ruling in Zadvydas v. Davis,” ICE spokeswoman Virginia Kice said.  The ruling Kice cited held that immigrants under order of deportation but whom no other country will accept may not be held indefinitely, absent special circumstances. Last year, 3,735 illegal immigrant criminals from Laos were ordered deported but instead freed when the country refused to cooperate.

"This is another horrifying example of the consequences of failing to push the issue of deportations with uncooperative countries," said Jessica Vaughan, Director of Policy Studies for the Center for Immigration Studies. "Laos has been a problem for many years, and there are more than 3,700 criminals still here as a result, but still the State Department has not lifted a finger to take action against that government. Instead, they keep issuing visas – they gave out more than 11,000 temporary visas in the last five years in Laos, despite the requirement in federal law that they impose visa sanctions on countries that won’t take back their citizens."

Vaughan said she hopes the wounded officers will recover, and that they and Fresno County officials will ask the federal government for an explanation for why nothing has been done about this problem, and call for action before others are hurt.

By contrast, some 67,792 Mexican nationals slated for removal could not be deported and nearly 29,000 Cubans were also freed after deportation failed.

The issue made national headlines in June, when the Inspector General for the Department of Homeland Security, ICE’s parent agency, blasted the department for not doing more to ensure deportation of a Haitian national who murdered a Connecticut woman after being released from prison.

The Connecticut case prompted House Oversight Committee Chairman Jason Chaffetz, R-Utah, to blast the State Department at a July hearing for not doing more to force recalcitrant countries to take back their criminals. The law states that the State Department must stop issuing visas to citizens of such countries until they cooperate with removals.

“He should have automatically been deported back to his home country of Haiti after he was released from prison,” Chaffetz thundered. “But instead, he was released from custody because Haiti refused to take him back and we just accepted that. We just said, ‘Ok Haiti, we’ll go ahead and keep him here in the United States.’”

The case involving Laotian national Vang comes even as President Obama is in the Southeast Asian country on a diplomatic mission. It is not known if Obama raised the issue of improving cooperation on deportations.

“ICE continues to work through diplomatic channels with its partners at the Department of State to increase repatriation,” Kice said in a statement. “The U.S. government remains firm and focused in its resolve to engage all nations that deny or unreasonably delay the acceptance of their nationals.”

Despite ICE’s inability to deport Vang, the agency had him under supervision and he was complying with orders to report on a regular basis, Kice said.

Vang was in the main lobby of the Fresno County Jail Saturday morning when he opened fire with a handgun, wounding Juanita Davila and Toamalama Scanlan. Davila was listed in critical but stable condition and Scanlan was in critical condition.

Fresno police officials said Vang was acting bizarrely and had been stopped from cutting to the front of the visitation line. Davila and Scanlan were shot when they approached Vang and told him to take a seat.

Vang dropped his weapon and surrendered after the shooting.

Fresno County Sheriff Margaret Mims told reporters after the incident that Vang belongs behind bars, in whatever country happens to hold him.

“This suspect is a prison inmate, a convict, a parole, and maybe that’s where he belongs for the rest of his life,” she said.

Fox News' William Lajeunesse contributed to this report