Donald Trump received a double whammy from the court system on Friday with two rulings against his immigration policies, one of which will slow down the building of his border wall.

A federal judge in Texas ruled the president's declaration of a national emergency to build a border wall is unlawful, which is likely to prevent the administration from using funds from the military to build the president's signature campaign promise.

In another blow, a federal judge in New York blocked the president's policy to deny green cards for immigrants who will likely to need legal public welfare services.

Donald Trump received a double whammy from the court system on Friday with two rulings against his immigration policies

A federal judge in Texas ruled the president's declaration of a national emergency to build a border wall is unlawful

The administration, under the auspice of White House adviser Stephen Miller, designed a rule to expand the definition of a 'public charge' to go beyond cash assistance.

Under the proposal, immigrants who use legal government services - such as Supplemental Security Income (SSI), Supplemental Nutrition Assistance Program (SNAP), Temporary Assistance to Needy Families (TANF), and most forms of Medicaid - would have that counted against them in their application for a green card.

A 'public charge' typically refers to someone who is 'primarily dependent on the government for subsistence' based on their receipt of 'public cash assistance.'

Trump's new rule, which was set to go into effect October 15, expanded that to include those receiving food stamps, housing assistance and/or Medicaid - use of which would count as a negative factor when being evaluated for a green card.

Judge George Daniels of the United States District Court in the Southern District of New York, in his ruling on Friday, said those potentially affected by the new rule could suffer 'irreparable harm' from it. Daniels was a Bill Clinton appointee.

Ken Cuccinelli, the acting director of U.S. Citizenship and Immigration Services, had famously defended the proposed change by changing the words of the famous poem on the Statue of Liberty to include the 'poor who can stand on their own two feet.'

He was asked in August during an NPR interview if the words from Emma Lazarus' poem - 'give me your tired, your poor' - were still part of 'the American ethos.'

‘They certainly,' he responded and then changed the words: 'Give me your tired and your poor who can stand on their own two feet and who will not become a public charge.'

Friday's ruling halted the proposal's implementation. Several state attorneys general sued to stop it.

The Trump administration is expected to appeal.

Additionally on Friday, the president suffered a blow in his long-standing dream to build a wall along the 2,000 mile U.S.-Mexico border.

Trump declared a national emergency to get the funds he needed to build his long-promised border wall after lawmakers on Capitol Hill refused to allocate the money.

But the ruling of Judge David Briones of the US District Court for the Western District of Texas will stop that move, including the administration's attempt to move money from the military to building the border wall. Briones was also a Clinton appointee.

Defense Secretary Mark Esper informed congressional leaders last month that the Pentagon would divert $3.6 billion in military construction projects for an additional 175 miles of border wall, which will be a combination of new structures and improvements to already existing barricades.

And a federal judge in New York blocked the president's policy to deny green cards for immigrants who will likely to need legal public welfare services

The decision infuriated lawmakers who have charged the White House with illegally over riding Congress's authority over the federal budget.

Trump argued he would get 500 miles of border wall build by the end of the year - before heading into the 2020 election - with the move.

Building a wall along the 2,000 mile border between the U.S. and Mexico was Trump's most prominent campaign promise during the 2016 election. But he has struggled to deliver in the wake of opposition from Democrats and the expense involved. It's estimated it will cost $5 billion to build the full border wall.

Trump declared a national emergency in February to get around Congress' refusal to fully fund the wall.

Section 2808 of U.S. code allows the defense secretary, during national emergencies requiring the use of the military, to move forward on construction projects to support the troops without the approval of Congress.

Esper said the building of the wall will support American forces deployed to the U.S.'s southern border with Mexico.

Although lawmakers grumbled at the president's emergency declaration, they were unable to muster the necessary votes to veto it in February.

El Paso County, Texas, and Border Network for Human Rights sued the administration over the declaration and sought the injunction delivered on Friday to keep it from going into affect.