CNN  — 

A divided Supreme Court on Friday allowed continued construction of a portion of President Donald Trump’s border wall while legal challenges play out.

The 5-4 order represents a loss for environmental groups represented by the American Civil Liberties Union, which had asked the justices to lift an order from a year ago that allowed the government to continue building the wall pending appeals. It is a win for Trump, who has made the construction of the wall a cornerstone of his presidency.

The portions of the wall in question are in Arizona, New Mexico and California.

Justice Stephen Breyer, joined by Justice Ruth Bader Ginsburg, Elena Kagan and Sonia Sotomayor dissented. Breyer noted that by the time the court reaches the case on the merits, the portion of the wall may already be complete.

“The Court’s decision to let construction continue nevertheless, I fear, may operate in effect, as a final judgment,” Breyer wrote.

The dispute concerns the ACLU’s challenge to the use of $2.5 billion from the Pentagon to construct parts of the wall along the southwestern border. Last month, a federal appeals court ruled against Trump, arguing that the administration doesn’t have the authority to divert Pentagon funds to build additional barriers on the US-Mexico border without congressional authorization. But the opinion had no immediate effect because of the Supreme Court’s order from last year that is still in place.

“The fight continues,” said Dror Ladin, staff attorney with the ACLU’s National Security Project, in a statement following the Supreme Court’s order.

Ladin pointed to lower court rulings against the wall and asserted that the high court’s order Friday was temporary and not the final say on the case.

“We’ll be back before the Supreme Court soon to put a stop to Trump’s xenophobic border wall once and for all,” he continued. “The administration has admitted that the wall can be taken down if we ultimately prevail, and we will hold them to their word and seek the removal of every mile of unlawful wall built.”

Ladin said before the order was issued that if the Supreme Court did not lift its own stay the wall would be constructed by the time the court decided whether to take up the case.

Lawyers for the Department of Justice urged the justices to leave their stay in place, noting that the government plans to ask the Supreme Court to take up the case in early August. Such a timeline would mean the justices could decide early in the fall whether to hear the dispute.

“As the government previously explained, halting the construction process during litigation imposes significant costs on DoD, which can be required to reimburse its contractors for the additional expenses that such a delay causes them to incur,” government lawyers argued.

CNN’s Caroline Kelly contributed to this report.