A coalition of 16 US states led by California is suing President Donald Trump's administration over his decision to declare an emergency to raise funds for a Mexican border wall.
Mr Trump made the declaration on Friday to bypass Congress after it refused to approve $5.7bn (£4.4bn) for the wall.
The states say they want to block his "misuse of presidential power".
The Democrats oppose funding Mr Trump's barrier, a key campaign pledge, and have vowed to contest his plan.
The president's announcement came after he signed a spending bill to avoid another government shutdown that granted him only $1.375bn for new border barriers.
Mr Trump said he had not needed to declare the emergency but had done so in the hope of obtaining the funds for the wall more quickly. Analysts say these comments could undermine his legal arguments.
Why is Trump being sued?
The lawsuit filed on Monday seeks to stop Mr Trump acting on his emergency declaration to build the wall, saying the president does not have the power to divert funds approved by Congress to pay for his project.
It says Mr Trump's decision is "unconstitutional and unlawful" and that "by the president's own admission" an emergency declaration is not necessary.
"We're suing President Trump to stop him from unilaterally robbing taxpayer funds lawfully set aside by Congress for the people of our states. For most of us, the office of the presidency is not a place for theatre," California Attorney General Xavier Becerra said.
Joining California in the lawsuit were Colorado, Connecticut, Delaware, Hawaii, Illinois, Maine, Maryland, Minnesota, Nevada, New Jersey, New Mexico, New York, Oregon, Virginia and Michigan.
The states - all of them but Maryland governed by Democrats - say the lawsuit aims to protect their residents, natural resources and economic interests. They argue that Mr Trump's order to divert funds would cost them millions of dollars.
California Governor Gavin Newsom dismissed the president's decision as "political theatre" while New York state's Democratic Attorney General Letitia James promised to "fight back with every legal tool at our disposal".
Mr Trump responded to the suit on Tuesday, tweeting it was as he "predicted".
As I predicted, 16 states, led mostly by Open Border Democrats and the Radical Left, have filed a lawsuit in, of course, the 9th Circuit! California, the state that has wasted billions of dollars on their out of control Fast Train, with no hope of completion, seems in charge!— Donald J. Trump (@realDonaldTrump) February 19, 2019
In his Twitter retort, Mr Trump referenced a high-speed San Francisco to Los Angeles train project in California that stalled out last week due to costs.
The failed Fast Train project in California, where the cost overruns are becoming world record setting, is hundreds of times more expensive than the desperately needed Wall!— Donald J. Trump (@realDonaldTrump) February 19, 2019
How did Trump declare the emergency?
The president said the emergency would allow him to get almost $8bn for the wall, still considerably short of the estimated $23bn cost of the barrier along almost 2,000 miles (3,200km) of border.
Mr Trump accepted that he would be sued for the move, and predicted that the case was likely to end up in the Supreme Court.
"We're going to confront the national security crisis on our southern border," said Mr Trump, who repeatedly declared during the 2016 presidential campaign that Mexico would pay for the wall. "Everyone knows that walls work."
Critics, however, have accused the government of manufacturing a crisis, saying the president's assertions about the situation are untrue.
Experts say the largest number of illegal migrants settling in the US each year is those who stay in the country after their visas expire, and that most drugs are trafficked into the US through ports of entry.
Following the declaration on Friday, a liberal advocacy group, Public Citizen, sued on behalf of a nature reserve and three Texas landowners who were told the wall could be constructed on their properties.
What is a national emergency?
The National Emergencies Act is intended for times of national crisis. Declaring it gives the president access to special powers that effectively allow him to bypass the usual political process.
Mr Trump could be able to divert money from existing military or disaster relief budgets to pay for the wall.
Emergency declarations by previous presidents have been overwhelmingly used for addressing foreign policy crises - including blocking terrorism-linked entities from accessing funds or prohibiting investment in nations associated with human rights abuses.
The emergencies act contains a clause that allows Congress to terminate the emergency status if both houses vote for it - and the president does not veto.
With a comfortable majority in the House, Democrats could pass such a resolution to the Senate. The Republicans control the Senate, but a number of Republican senators have been vocal in their unease about the president invoking a national emergency in this case.
The resolution would however still require Mr Trump's signature to pass, allowing him to veto it. A supermajority in both houses of Congress - currently in a weeklong recess - is needed to overturn a presidential veto.