SAN FRANCISCO — A Trump administration policy that requires green-card holders to pass a background check before they can start military service is discriminatory and has left hundreds of enlisted people in limbo, a civil liberties group alleges in a lawsuit Thursday.

The U.S. Department of Defense announced the new policy in October 2017. Green-card holders could previously report for basic service while their background checks were pending, and U.S. citizens still can, according to the American Civil Liberties Union, which is seeking a court order blocking the policy.

“There is no justification for discriminating against individuals who want to risk their lives for this country simply because of their immigration status,” Sameer Ahmed, a staff attorney with the ACLU Foundation of Southern California, said in a statement.

The Defense Department cannot discuss pending litigation, spokesman Johnny Michael said.

Permanent residents who serve in the military may be able to obtain citizenship faster than other green-card holders. The department’s announcement last year quotes Stephanie Miller, director of accessions, saying it was in the “national interest to ensure all current and prospective service members complete security and suitability screening prior to naturalization.”

The announcement says the clearance procedure could take up to a year.

Ahmed said the ACLU is not aware of any permanent residents who have been cleared to serve since the policy went into effect, making it effectively a “ban on green-card holders in the military.”

The lawsuit names two permanent residents as plaintiffs, Jiahao Kuang and Deron Cooke, but seeks class-action status on behalf of an estimated 3,000 people who have not been able to start basic training.

Kuang and Cooke enlisted in the military last year, but they have no idea when they will be allowed to serve, according to the lawsuit. Kuang put off going to college to serve, and it’s difficult for him to get a job because he does not know when he will have to report for basic training, the suit says.

Cooke works for a technology company, but is hesitant to apply for a promotion because he doesn’t know when he will have to leave, according to the lawsuit.