(Reuters) - A federal appeals court on Wednesday refused to lift an injunction barring the Trump administration from using $2.5 billion intended for the fight against illegal narcotics to build a wall along the southern U.S. border with Mexico.

A U.S. security heliporter flies near the border wall during the visit of U.S. President Donald Trump to Calexico, California, as seen in Mexicali, Mexico April 5, 2019. REUTERS/Carlos Jasso

The ruling was another setback in President Donald Trump’s effort to construct a border wall, one of his top promises in the 2016 presidential campaign. He pledged at the time that Mexico would pay for it.

“Congress did not appropriate money to build the border barriers defendants seek to build here,” a three-judge panel of the 9th U.S. Circuit Court of Appeals said in a 2-1 ruling.

“Congress presumably decided such construction at this time was not in the public interest. ... It is not for us to reach a different conclusion,” the panel said.

Trump has been unsuccessful in persuading Congress to fund the wall. In February, the president declared a national emergency, saying that would entitle the administration to reprogram $6.7 billion in funds Congress had allocated for other purposes to build the wall.

Several states, including California, and organizations, including the Sierra Club and the Southern Border Communities Coalition, challenged the administration decision in two lawsuits.

A U.S. District Court judge in California ruled last Friday that the Trump administration’s proposal to build the border wall with money appropriated for the Defense Department to use in the fight against illegal drugs was unlawful. The judge issued an injunction barring use of the funds for a border wall.

The Trump administration appealed the decision on Saturday and asked that the injunction barring use of the reprogrammed funds be stayed pending the outcome of its appeal of the court decision.

But the three-judge panel rejected that request on Wednesday.

“We conclude that the public interest weighs forcefully against issuing a stay,” the panel said. “The Constitution assigns to Congress the power of the purse. Under the Appropriations Clause, it is Congress that is to make decisions regarding how to spend taxpayer dollars.”