PITTSBURGH (AP) — A federal judge on Monday struck down Gov. Tom Wolf’s pandemic restrictions that required people to stay at home, placed size limits on gatherings and ordered “non-life-sustaining” businesses to shut down, calling them unconstitutional.

U.S. District Judge William Stickman IV sided with plaintiffs that included hair salons, drive-in movie theaters, a farmer’s market vendor, a horse trainer and several Republican officeholders who sued as individuals.

Stickman, an appointee of President Donald Trump, wrote in his ruling that the Wolf administration’s pandemic policies have been overreaching, arbitrary and violated citizens’ constitutional rights.

The governor’s efforts to slow the spread of the coronavirus “were undertaken with the good intention of addressing a public health emergency,” Stickman wrote. “But even in an emergency, the authority of government is not unfettered.”

Courts had consistently rejected challenges to Wolf’s power to order businesses to close during the pandemic, and many other governors, Republican and Democrat, undertook similar measures as the virus spread across the country.

Wolf has lifted many of the restrictions since the lawsuit was filed in May, allowing businesses to reopen and canceling a statewide stay-at-home order. But his administration has maintained capacity restrictions and limitations on alcohol sales at bars and restaurants. The state has also imposed a gathering limit of more than 25 people for events held indoors and more than 250 people for those held outside.

A spokesperson for Wolf said the administration was reviewing the decision.

Pennsylvania has reported that more than 145,000 people statewide have contracted the virus since the beginning of the pandemic. More than 7,800 people have died.