Four US states are suing the Trump administration over the president’s executive order banning refugees and travelers from a list of predominantly Muslim countries from entering America.

New York, Massachusetts and Virginia on Tuesday joined Washington state on a growing list of states challenging the travel ban that caused chaos at airports in those states and beyond at the weekend as people with valid immigration documents were detained or deported after arriving on flights from overseas.

On Tuesday New York joined a federal lawsuit against Trump’s executive order brought by the American Civil Liberties Union Foundation, the Urban Justice Center and others.

Eric Schneiderman, the New York state attorney general, described the order signed last Friday as “unconstitutional, unlawful, and fundamentally un-American”.

Washington became the first state to sue the White House on Monday. Online retail behemoth Amazon, which is headquartered in Washington, pledged support.

Later on Tuesday, the state of Virginia became a plaintiff in a federal lawsuit filed over an incident on Saturday where two Yemeni brothers arrived at Dulles airport from east Africa with residency green cards, planning to join their father in Michigan, but were blocked by agents enforcing the travel ban and put on a flight back the way they had come. The lawsuit seeks to restore the immigration rights of the brothers and up to 60 others whom lawyers say suffered a similar fate at Dulles at the weekend.

But the state’s intervention also has broader aims, claiming the enforcement of the executive order in general is unlawful and threatens the “health and wellbeing, both physical and economic” of its residents, and its public universities and colleges in particular.

“Virginia has a substantial interest in protecting its public universities and their faculty and students from the academic and fiscal disruption posed by the executive order,” according to the state’s motion.

It complains that the order hampers students who are residents or on student visas from continuing to attend Virginia’s public colleges and universities, and will disrupt academics trying to travel for work, resulting in difficulty in attracting talent to the state and “significant loss of tuition revenue to the commonwealth [Virginia]”, the motion, filed in federal court in Alexandria, stated.

Massachusetts also joined the growing legal effort to block Trump’s order on Tuesday. The state joined a federal lawsuit that had been filed in Boston at the weekend as a result of travelers being detained at Logan airport, including two Iranian academics from the University of Massachusetts Dartmouth.

And the Massachusetts attorney general, Maura Healey, said the state was also filing its own case seeking to have the ban struck down.

“The executive order is harmful, discriminatory and unconstitutional. It discriminates on the basis of religion and national origin,” Healey said at a press briefing at her office.

She used Twitter to declare the travel ban unconstitutional.

“By filing this suit today, we are fighting for the principles that have made America a beacon of hope and freedom for the world,” she added, saying she hoped other states across the country would do the same, reiterating the sentiments in another tweet.

Healey was joined at the press conference by several local academic, business, medical and advocacy leaders, including the University of Massachusetts president, Marty Meehan, who said the executive order undermined the university’s mission and tweeted his support for the federal challenge.

The Massachusetts governor, Charlie Baker, also issued a statement of support for the attorney general’s action.

Friday’s abrupt executive order, signed by Trump around 4.30pm, banned refugees from entering the US for four months and banned refugees from Syria indefinitely. It also barred travelers, initially including permanent US residents, who are citizens of Iran, Iraq, Libya, Somalia, Sudan, Yemen and Syria or dual citizens of those countries and another non-US country from entering America.

Many who were already flying to the US when the order was signed were detained on arrival at US airports, in New York, Los Angeles, Atlanta, Houston, Boston, Seattle and elsewhere. Many were denied boarding on to US-bound flights or were taken off the planes by security officials before the flights took off, citing instructions relayed from border agents in the US, sparking protests in the US at the weekend.

“We are seeing progressive states that want to stand up for their communities and it’s a really powerful action,” said Melissa Keaney of the National Immigration Law Center, which was involved in the federal lawsuit filed against the executive order on Saturday night in New York.