WASHINGTON – The Supreme Court ruled Friday that President Trump can use $2.5 billion in military funding to begin building a portion of his long-sought wall along the nation's southern border.

The high court's order temporarily settles just one of several skirmishes between the Trump administration and House Democrats, "blue" states led by California, and environmental groups over border wall funds.

The court's five conservative justices lifted an injunction against the border wall spending that had been imposed by a federal district court judge in California and affirmed by a federal appeals court. The injunction blocked spending while the lawsuit challenging it remains pending at the appeals court.

The five-member majority said in a brief order that the challengers appear to "have no cause of action" to review the Defense Department's authority to move up to $4 billion between accounts.

The four liberal justices said they would have denied the spending while the lawsuit works its way through the courts. One of them, Associate Justice Stephen Breyer, would have allowed preliminary planning but not the appropriation of funds.

Instead, Breyer said, the court majority allowed construction to start on a barrier that could "cause irreparable harm to the environment and to respondents.... The government’s only response to this claim of irreparable harm is that, if respondents ultimately prevail, the border barrier may be taken down."

President Trump hailed the action within minutes of the high court's announcement. "Big WIN for Border Security and the Rule of Law!" he tweeted.

The American Civil Liberties Union, which represents challengers in the dispute, said it would ask the U.S. Court of Appeals for the Ninth Circuit, where the case remains pending, to speed up consideration of the government's appeal.

"This is not over. We will be asking the federal appeals court to expedite the ongoing appeals proceeding to halt the irreversible and imminent damage from Trump's border wall," ACLU attorney Dror Ladin said. "Border communities, the environment, and our Constitution’s separation of powers will be permanently harmed should Trump get away with pillaging military funds for a xenophobic border wall Congress denied."

Alexei Woltornist, a spokesman for the Department of Justice, said in a statement: "We are pleased that the Supreme Court recognized that the lower courts should not have halted construction of walls on the southern border. We will continue to vigorously defend the Administration’s efforts to protect our Nation.”

The dispute, which has divided the nation in much the same way a wall would divide the U.S. and Mexico, dates back to last winter's federal budget fight that resulted in a record, five-week partial government shutdown. That fight ended with Democrats agreeing to spend a fraction of what the president wanted.

Fact or fiction:Is Trump's border wall being built? Here are the facts

Then in February, Trump declared a national emergency in an effort to redirect funds from other federal agencies to the Department of Homeland Security. Among the pots of money was $2.5 billion in Pentagon funds that was to go toward building about 80 miles of barriers in California, Arizona and New Mexico to help block the flow of drugs across the border.

Several lawsuits followed and advanced while Congress initially blocked the emergency spending. After Trump vetoed that action, the Democratic-controlled House failed to override his veto.

Federal District Judge Haywood Gilliam ruled last month that the spending transfer was unlawful, but he also rejected arguments that it would threaten species of wildlife such as bighorn sheep. Earlier this month, a panel of the Ninth Circuit appeals court ruled 2-1 that Gilliam's injunction should remain in place.

That prompted the Justice Department's request to the Supreme Court. Solicitor General Noel Francisco argued in court papers that Trump has the authority to transfer funds within the budget. He urged the justices to free up the Pentagon funds so they can be spent before Sept. 30, when the current budget authority expires.

Opponents of the border wall pushed back, arguing that Congress had already denied the funds in February's budget agreement ending the partial shutdown.

"Defendants now ask this court to allow them to swiftly spend billions of dollars that Congress denied, across more than a hundred miles of lands on which Congress refused to authorize construction," the ACLU argued.

Douglas Letter, general counsel for the House of Representatives, noted that Trump said in February he "didn't need to do this" emergency declaration, because he could "do the wall over a longer period of time."