President Donald Trump on Friday won a case in a federal appeals court, allowing his administration to move $3.6 billion military funds for the construction of the border wall along the Mexican border.

The Fifth Circuit Court of Appeals voted two-to-one in favor of the Trump administration to divert the military funds for the El Paso, Texas border wall.

Two judges found that the complainants from Texas did not have the standing to go against the Trump administration's plans to divert the military funds, said Stars and Stripes.

According to One America News, the groups can't challenge the border wall case's decision since they could not prove the move would harm them.

The ruling overturns a decision made by an El Paso judge who said Trump broke the law by declaring a national emergency to redirect the funds after Congress refused to pay for it. 

(Photo : Sandy Huffaker/Getty Images) A plaque commemorating President Donald Trumps hangs on the United States-Mexico border wall on December 1, 2020 in Calexico, California.

Read also: Trump Presses Grievances Over Presidential Election in Rally for Runoff Candidates in Georgia

The Supreme Court also agreed to review the 9th Circuit ruling, saying the funds were illegal. The 5th Circuit said it disagreed with that ruling and would "decline to follow" it.

But in Judge James Dennis' minority opinion, he said he supported the El Paso County and the nonprofit Border Network for Human Rights.

He added that he did not want to join the majority since he believed the "2019 Consolidated Appropriation Act clearly prohibited the redirection of funds that underpins the border-wall." 

Trump Calls Arrival of Illegal Migrants 'Tremendous National Emergency'

For the president, the border wall construction is necessary to avoid any threats brought by illegal immigration, saying it was a "tremendous national emergency."

"Last month, more than 76,000 illegal migrants arrived at our border," Trump said.

He added that the rush of immigrants to the nation's borders was an "invasion of drugs, criminals and people we have no idea who they are."

Since the start of his campaign in 2016, the border wall had been Trump's top campaign promise, along with the promise to curb both legal and illegal immigration. 

Read also: 27 Congressional Republicans Acknowledge Biden as President-Elect, Trump Wants to Know Who They Are

He declared a national emergency last year to transfer the billions-worth of funds after failing to get Congress' funding.

According to The Hill, this led to the longest government shutdowns in the country's history.

Local Community Argues Loss of Tourism, Economic Activity at Border Wall

The local communities near the border wall said the move would affect tourism and economic activities because Trump continues to tell the area was crime-ridden.

But the court majority ruled that the harm could not be linked to the Pentagon funding shift. The court demanded a "direct link" such as a loss of specific tax revenue for the plaintiffs to say that they that the movement of funds harmed them in such a way.

Some also argued that the wall's construction would damage the pristine land it will cut through.

"It's a huge richness of biodiversity, of culture and relationship between the two nations," conservationist Jose Manuel Perez told CBS News"We are losing that with this wall."

For the border wall to be finished, roads have to be carved out of mountainsides so machines could operate and sink high steel beams into concrete.