A federal judge has ruled that a 2011 law requiring welfare applicants to undergo drug tests is unconstitutional, striking a blow to Gov. Rick Scott’s administration over the controversial tests.

Scott quickly said he would appeal U.S. District Judge Mary Scriven’s Tuesday ruling, the latest defeat for the governor in a drawn-out battle over drug testing some of the state’s poorest residents.