The Supreme Court decided last week that Department of Defense funding could be used to construct sections of President Donald Trump's wall at the US-Mexico border.

Programs set to lose funding include a retirement program for the military and a program to support Afghan security forces, among others.

Visit Business Insider's homepage for more stories.

The White House scored a major win last week after the Supreme Court in a 5-4 decision said that about$2.5 billion in Defense Department funds could be used to construct sections of the president's highly sought-after wall at the US-Mexico border.

President Donald Trump celebrated the news on Twitter, describing the decision as a "big WIN for Border Security and the Rule of Law!"

But Dror Ladin, a staff attorney for the American Civil Liberties Union's National Security Project who represented the groups who filed a lawsuit challenging Trump's emergency-powers declaration to secure funding to build the wall, was quick to point out in a statement that last week's order wasn't a final ruling but temporary and limited to specific wall projects.

"The Supreme Court didn't give Trump's abuse of emergency powers the stamp of approval, or say anything about whether the wall construction was lawful. Nor did the Supreme Court say that our clients lack standing," Ladin said.

Ladin added: "As our lawsuit proceeds, we will continue to make the case that our clients, who will be harmed because of Trump's xenophobic wall, deserve their day in court to prevent and undo that harm."

The ACLU's case, filed on behalf of the Sierra Club and the Southern Border Communities Coalition, will return to the 9th US Circuit Court of Appeals.

The Pentagon has eyes on where the money for the wall could come from

Border Patrol agents surveying the US-Mexico border. Adrees Latif/Reuters

But as the ACLU continues litigation to block the use of military funds for border-wall funding, Pentagon officials announced this week which programs would lose Defense Department funds to build the wall, The Wall Street Journal reported.

Notably, it said about $224 million would be taken from the Blended Retirement System, which combines elements of the military's retirement system with a system offering benefits similar to civilian 401(k) programs.

Other programs set to significantly lose funding: $604 million that was supposed to support Afghan security forces; $251 million in Pentagon funds for destroying US chemical weapons; and about $343 million "in spending from Air Force weapons programs where officials have negotiated reductions or canceled systems," The Journal said. Funds for construction projects for military bases across the world could also go toward the border wall.

Todd Harrison, director of the Defense Budget Analysis Program at the Center for Strategic and International Studies, told The Journal that while it isn't uncommon to shift funds among programs in the federal government, the size and method of the border-wall transfers were unusual.

In an interview on Thursday with Maria Bartiromo on Fox Business' "Mornings with Maria," the acting Customs and Border Protection chief, Mark Morgan, said the Defense Department funding would go not just toward a wall but "a wall system."

"There's technology. There's access roads. There's lighting," Morgan said.

"Every mile that goes up, we are exponentially raising our capacity with the Border Patrol to do their job effectively," he added.