Department of Homeland Security Secretary Kirstjen Nielsen announced Thursday that the U.S. has secured an agreement with Mexico so that immigrants claiming asylum will be returned to Mexico as their cases are processed -- a bid to end the practice known as “catch-and-release.”

Nielsen made the announcement Thursday at a House Judiciary Committee hearing, telling the committee that the goal is to crack down on migrants falsely claiming asylum, only to be released into the U.S. and escape the radar of immigration officials.

“But by the time the courts have issued their orders, most of these illegal aliens have vanished within our country for good,” she said. “They have escaped the law, undermined the system, and made it harder for us to actually help real asylum-seekers by flooding the system with false claims.”

CLICK HERE TO GET THE FOX NEWS APP

Nielsen said the goal is to “not ‘catch and release’ but ‘catch and detain’ -- or under our new protocols, ‘catch and remain in Mexico.’”

To combat this, she said those entering the U.S. illegally or without proper documentation would be returned to Mexico as their case is considered.

“They will not be able to disappear into the United States,” she said. “They will have to wait for approval to come into the United States. If they are granted asylum by a U.S. judge, they will be welcomed into America. If they are not, they will be removed to their home countries.”

She said that the Mexican government has pledged to provide migrants with humanitarian visas to stay and work in Mexico as they wait for a decision from the U.S. Migrants will also have access to attorneys and to the U.S for court hearings. She said all actions were in line with international law.

“We are taking lawful, unilateral action to stop illegal entry now,” she said. “Mexico is taking its own appropriate actions in response. And our two countries have committed to a major regional plan to solve the crisis.”

JUDGE ORDERS DEPORTED ASYLUM SEEKERS TO BE RETURNED TO US, IN TRUMP ADMINISTRATION REBUKE

Democrats fumed over the announcement, however. Nielsen had a heated back and forth with ranking Democratic Rep. Jerry Nadler, D-N.Y., who accused Nielsen of saying that legitimate asylum seekers would be detained for years.

“A policy that deliberately says that anyone who legitimately deserves political asylum should spend years in detention seems to be in gross violation of international law and of United States law," he said.

“I understand sir, but that’s not what I said,” Nielsen said.

DHS says it has seen a 2,000 percent increase in migrants claiming "credible fear" -- the first step to asylum -- and that asylum claims last year rose by 67 percent compared to the previous year.

President Trump has been a continuous critic of the “catch-and-release” practice, expressing both his anger and disbelief at the way illegal immigrants are set loose in the U.S., only to not turn up for a court proceeding that can be years away.

In November, Trump tweeted that he intended to enforce a policy whereby only those who enter the country legally will be allowed in.

“Other than that our very strong policy is Catch and Detain. No 'Releasing' into the U.S. All will stay in Mexico,” he tweeted, before warning that he would “close” the border if need be.

Trump made securing the southern border, along with a tough stance on illegal immigration, a cornerstone of his 2016 campaign -- but has at times struggled to implement that agenda facing a combination of difficult congressional math and a series of defeats in the courts.

One such judicial setback came Wednesday, when a federal judge ordered that asylum seekers who sued after their deportation be returned to the U.S. to have their claims heard again.

“The Court holds that it has jurisdiction to hear plaintiffs’ challenges to the credible fear policies, that it has the authority to order the injunctive relief, and that, with the exception of two policies, the new credible fear policies are arbitrary, capricious, and in violation of the immigration laws,” Judge Emmet Sullivan wrote.

Meanwhile, a judge in San Francisco extended his decision blocking the administration from enforcing a ban on asylum for any immigrants who illegally cross the U.S.-Mexico border.

Fox News' John Roberts, Brooke Singman and Bill Mears contributed to this report.