New Jersey has allocated $2.1 million in taxpayer money to groups to provide legal help to undocumented immigrants facing deportation.

Gov. Phil Murphy, a Democrat who included the money in his first state budget, announced Monday his administration has reached an agreement with four groups to help undocumented immigrants who can't afford an attorney.

The state allocated $925,000 each to Legal Services of New Jersey and the American Friend Service Committee.

It allocated $125,000 apiece to the law schools at Rutgers and Seton Hall universities.

"Families who came to New Jersey for a better life do not deserve to be torn apart by the federal government's cruel and discriminatory policies," Murphy said in a statement. "Deportation is one of the harshest consequences an individual can face under U.S. law, yet most immigrants do not have the right to appointed counsel and many cannot afford an attorney."

The move is yet another way Murphy is challenging President Donald Trump, a Republican. New Jersey has seen a surge in undocumented immigrants being arrested by federal officials since Trump's election.

U.S. Immigration and Customs Enforcement arrested 3,189 undocumented immigrants in the Garden State in fiscal year 2017 -- a 42 percent uptick from the year before.

Murphy said on his call-in radio show Monday night this money was needed because undocumented immigrants often don't know where to go "to get the right answer."

He said "in this era of Trump," people are being scared "into the shadows," and it's "shaken a lot of our communities."

"I believe with all my heart in the 'safer cities' notion," Murphy said. "When folks feel like they can come out of the shadows, engage with their neighbors, community leaders, elected official, law enforcement members importantly, you have a safer, more stable community."

He said the "intention here is to put an amount of money in place that begins us on a process where people know where to go."

Murphy said he didn't know how many immigrants this would help.

"But it's a start," he said on the show, which was broadcast on public radio stations WBGO in Newark, WNYC in New York City, and WHYY in Philadelphia.

Murphy said his administration came up with the $2.1 million figure based on averaging $100,000 per each of New Jersey's 21 counties.

Erika Nava, a policy analyst at liberal think tank New Jersey Policy Perspective, told NJ Advance Media on Monday the cost to represent every undocumented immigrant who's incarcerated in New Jersey could reach as much as $15 million.

Even though this money would be a sliver of that, Nava said it's a "step in the right direction."

A recent report by Policy Perspective said 67 percent of immigrants facing deportation in the state go before judges without a lawyer.

State Treasurer Elizabeth Muoio said the move will also "dramatically reduce" the costs taxpayers foot for detention of undocumented immigrants. There are three ICE detention centers in New Jersey.

Melville D. Miller Jr., president of Legal Services, said immigrants seeking help will "receive a full assessment of their legal claims and specific advice concerning their legal rights."

Other Democratic-led states, such as New York and California, provide legal help to poor immigrants.

Brent Johnson may be reached at bjohnson@njadvancemedia.com. Follow him on Twitter @johnsb01. Find NJ.com Politics on Facebook.