A federal district judge in South Carolina has upheld a provision of the state’s controversial immigration statute, holding that police may check the immigration status of motorists they suspect are illegally present in the United States.

The decision follows a similar holding in Arizona, which permits police officers to check the immigration status of individuals pulled over for an unrelated violation. Importantly, the judge cautioned that his holding will not apply to other parts of South Carolina’s immigration law and expressed concern about assessing the reasonableness of detention durations.