ST. PAUL (AP) -- Minnesota has joined with 15 other states in suing to block President Donald Trump's declaration of an emergency to fund his proposed wall on the U.S. border with Mexico.

Attorney General Keith Ellison says the plan to divert funds is illegal and unconstitutional. He says federal money designated for the Minnesota National Guard would be at risk, challenging efforts to intercept drug trafficking and respond to natural disasters.

Minnesota is joining a lawsuit filed Monday by California's attorney general. It says Trump is violating the separation of powers by trying to spend money that Congress has not appropriated.

Trump declared the national emergency Friday after failing to get all the money he sought to complete the border wall. He's trying to tap money from military construction and other defense accounts.