Two immigrants on expired student visas won’t have time spent out of lawful status counted against them while they litigate a new government policy covering those visas.

A federal judge in North Carolina Jan. 28 ordered that U.S. Citizenship and Immigration Services’ policy temporarily not apply to Jia Ye and Sen Li. Both face being barred from re-entering the U.S. for three years if the policy remains fully in effect.

The lawsuit, originally filed in October, challenges an August 2018 policy that determines when international students on F, M, or J visas start accruing “unlawful presence.” Unlawful presence refers...