President Donald Trump would almost certainly face a legal challenge if he carries out his threat to get funding for a U.S.-Mexico border wall by declaring a national emergency and circumventing Congress's purse-strings power.Legal scholars said it was unclear exactly how such a step would play out, but they agreed that a court test would likely focus on whether an emergency actually exists on the southern border and on the limits of presidential power over taxpayer funds.Declaring an emergency would likely end a 17-day-old partial government shutdown. But it could also result in a long court fight, possibly stretching into Trump's 2020 reelection bid and emboldening critics who accuse him of authoritarian tendencies.Trump has triggered a partial shutdown of the government by demanding the inclusion of $5 billion for his proposed wall in any legislation to fully reopen agencies whose funding expired on Dec. 22.When Trump first started vowing to build a wall, he pledged Mexico would pay for it. But Mexico refused and now Trump wants U.S. taxpayers to pay for the roughly $23-billion project.The lawUnder the Constitution, decisions about spending taxpayer funds and creating new policy are made by Congress. However, the president can make quick decisions during emergencies under a patchwork of laws in specific situations such as war, natural disasters and epidemics.A 2007 report by the Congressional Research Service, a nonpartisan research arm of the legislature, said: "Both the judiciary and Congress, as co-equal branches, can restrain the executive regarding emergency powers."The National Emergencies Act of 1976 was meant to create a congressional check on presidential emergencies. Under the law, the president must notify Congress and the public about an emergency declaration.Congress can override such a declaration, but it requires approval by both chambers. That could be hard to get with the House of Representatives under the control of Democrats, but the Senate in the hands of Trump's fellow Republicans.The border Trump may argue illegal immigration constitutes a national emergency, entitling him to mobilize the military to the border and use Defense Department personnel to design and construct a wall. One way to challenge such an assertion would be to demand Trump show in court that an emergency actually exists.The moneyEven if Trump could convincingly declare an emergency, he would need to get his wall money out of funds already appropriated by Congress for other purposes.He could run into problems if he tried to shift funds dedicated to something else to his wall. Congress does give federal agencies some money without clear priorities. Trump would likely need to tap that kind of funding to avoid violating congressional authority.Trump hasn't shied away in the past from unilateral action.But the liberal Center for American Progress said a national emergency strategy would be "illegal, plain and simple."House Democrats have already said they would be opposed. Mark Tushnet, a constitutional law professor at Harvard Law School, said, "It's a very aggressive use of presidential authority. The fact that it's aggressive doesn't mean it's unlawful. But it does mean that it goes beyond the boundaries of what has been done before."