The Supreme Court on Friday, July 26, ruled that the Trump administration could begin using military funds to build a wall on the northern border, providing a significant legal win to the president.

The decision allows the administration to move ahead with plans to use certain military funds to replace existing border fencing in California, Arizona, and New Mexico.

Supreme Court Justices Elena Kagan, Ruth Bader Ginsburg, and Sonia Sotomayor denied the ruling, and Justice Stephen Breyer offered a split opinion. But five conservative justices on the court ruled in favor of the administration.

President Trump praised the news in a tweet, calling it a “Big WIN for Border Security and the Rule of Law!”

The administration had asked the justices earlier this month to temporarily pause lower court rulings that blocked officials from using some of the diverted Pentagon budget for border wall construction, according to The Hill.

Solicitor General Noel Francisco argued that the needs of the administration outweighed lower court rulings, which stopped the use of the Defense Department funds for the wall.

The American Civil Liberties Union (ACLU), which opposes funding for the wall, asserted to keep fighting.

On June 29, a federal judge prohibited President Trump from using $2.5 billion in military funding to build high-priority segments of the border wall in California, Arizona, and New Mexico.

Judge Haywood S. Gilliam, Jr. in Oakland, an Obama appointee, acted in two lawsuits filed by California and by activists who contended that the money transfer was unlawful and that building the wall would pose environmental threats.

The president called the decision of Judge Haywood Gilliam “a disgrace.” He said earlier this month, “So we’re immediately appealing it and we think we’ll win the appeal. There was no reason that that should have happened. And a lot of wall is being built.”

President Trump declared a national emergency earlier this year to reallocate the military funds for the border wall. The budget the president identified includes $3.6 billion from military construction funds, $2.5 billion in Defense Department money and $600 million from the Treasury Department’s asset forfeiture fund.

The case before the Supreme Court involved just the $2.5 billion in Defense Department funds, which the administration said will be used to construct more than 100 miles of fencing. One project would replace 46 miles of barrier in New Mexico for $789 million. Another would replace 63 miles in Arizona for $646 million. The other two projects in California and Arizona are smaller.

The White House, on Friday shared a video saying, “We are building the wall! Watch construction in progress near Imperial Beach, California.”

Includes reporting from the Associated Press