Lawyers for a California woman asked a state judge Thursday to order Greyhound Lines to stop allowing federal immigration agents to board its buses and demand identification and proof of citizenship from passengers.

The lawsuit, which seeks class-action status for all California residents, was filed in Alameda County by a U.S. citizen, Rocío Córdova, who said she was traveling from San Diego to Phoenix by Greyhound in November 2017 when the bus on which she was riding pulled overon a highwayto allow U.S. Customs and Border Protection officers to interrogate passengers.

Córdova accused the nation’s largest motor coach operator of violating state consumer protection laws barring unfair and unlawful business practices by allegedly consenting to racial profiling by law enforcement officers despite promises not to discriminate on the basis of race, skin color, national origin or language. Córdova said she also suffered economic injury from delays, and the suit seeks a court order barring the alleged practice.

The suit comes as civil rights groups, labor unions and Democratic lawmakers have stepped up a campaign against U.S. travel and transportation companies this year, urging them to stop tactics that the companies say are not new but which Customs and Border Protection officials say have been on the rise under the Trump administration.

This week, Motel 6, agreed to pay up to $8.9 million to settle a class-action lawsuit in federal court alleging that employees at two Phoenix properties provided the personal information of several Latino guests to immigration officials without a warrant, leading to their being detained. That lawsuit, filed in January, asserted that the motels invaded guests’ privacy and discriminated against them on the basis of race and national origin.

In addition to targeting Greyhound, whose 1,600 vehicles move 17 million passengers a year in the United States, Canada and Mexico, critics of such tactics have conveyed objections to Amtrak and other bus companies.

“Greyhound’s policy of voluntarily opening its bus doors to law enforcement officers to intimidate customers based on the color of their skin is not just offensive; it is unlawful. It needs to stop now,” said Darren J. Robbins, founder of Robbins Geller Rudman & Dowd, a San Diego law firm that specializes in class-action lawsuits and is representing Córdova.

A Greyhound spokesman, when asked about contentions in the new lawsuit, referred to an October statement by the company addressing CBP practices, in which Greyhound said it understood its customers’ concerns, called on Congress to change the law and said “it will support positive efforts to do so.”

Greyhound said in the statement that it neither coordinates with nor supports the CBP’s actions, adding, “CBP officers do not ask permission to board our buses. We do not want to put our drivers’ safety or the safety of our passengers at risk by attempting to stop a federal agent from conducting checks.”

Critics of the stops say Greyhound also has a history of upholding its customers’ civil rights, serving most famously as the vehicle for the “Freedom Riders” in 1961 who traveled on Greyhound buses to challenge racial segregation in public transit in the South.

Since March, the American Civil Liberties Union and 10 of its local affiliates around the country, 23 Democratic lawmakers and the Amalgamated Transit Union Local 1700 — which represents 3,500 Greyhound drivers, mechanics and terminal workers — have sent letters and a 200,000-signature petition to Greyhound urging the bus line “to stand up for passengers” and require federal border officers who want to board to show probable cause or warrants as a protection against unconstitutional searches and seizures.

“Civil liberties and civil rights groups, along with members of Congress and Greyhound’s own drivers, have urged Greyhound to change its policy. Greyhound’s ongoing conduct is in deliberate disregard for its customers’ rights,” plaintiffs attorney Rachel Jensen said.

The ACLU said it has documented CBP boardings of buses in Vermont, Calif., Washington state, Arizona and Michigan during which agents tended to focused on people of color or nonnative speakers of English, stating no other reasons for boarding and questioning passengers.

The publisher Consumer Affairs has reported that passengers receive little or no notice that they can be asked to reveal the contents of their luggage or to show proof of citizenship, and that stops can occur at random and can cause passengers to miss connections.

The complaint by Córdova said immigration officers target Greyhound because its riders are disproportionately nonwhite and low-income, particularly Latino.

The complaint included several videos, reports and statements by passengers of “coercive scenes” of armed officers blocking “narrow bus aisles, singling out passengers of color by hovering over them and accusing many of being ‘illegal.’ ”

The suit was filed by Robbins and Jensen, who was a lead attorney in litigation that resulted in a $25 million settlement for students who alleged fraud by Trump’s defunct real estate seminars, Trump University. Trump did not admit fault in the settlement.

Federal officers’ searches inflict humiliation, discrimination and delays of up to 30 minutes on bus passengers, and searches are being carried out more than 100 miles inside the country, the suit alleged.

Lawyers for Córdova said her bus was stopped on a highway in California after daybreak as it was en route to Phoenix.

In its Oct. 19 statement, Greyhound said, “CBP searches have negatively impacted both our customers and our operations,” adding, “We also encourage all our customers to know their rights and share their opinion on this important issue with their members of Congress.”