President Trump faced intensifying legal challenges on Monday over his decree sharply restricting immigration from the Muslim world, as two Democratic-leaning states signaled that they would attack the policy in court and a Muslim advocacy group filed a lawsuit calling the order an unconstitutional religious test.

The emerging legal actions are an aggressive effort by Democratic officials in the states to undercut Mr. Trump’s executive order, amid a chaotic debate in Congress over the propriety of the policy. Many Democrats at the state level have vowed to use every instrument at their disposal to thwart or blunt the impact of Mr. Trump’s policies.

In Washington State, Gov. Jay Inslee and Attorney General Bob Ferguson, both Democrats, announced on Monday that they would file a lawsuit seeking to gut Mr. Trump’s order, calling it a blunt attack on the Muslim faith that would damage businesses and individuals in the state.

Mr. Ferguson said in a news conference that the suit would be broader than any litigation filed elsewhere, and would be aimed at “invalidating the president’s unlawful action nationwide.” He said the state’s complaint would be backed by statements from major companies with their headquarters there, including Amazon and Expedia, attesting to the damaging nature of Mr. Trump’s action.