A Philadelphia judge had ordered ride-hailing companies to cease operations but both Uber and Lyft continued to offer rides there on Friday.
Both companies say they plan to appeal the order.
Judge Linda Carpenter issued the injunction Thursday. The original suit was filed in July by local taxi drivers. It alleged that the Philadelphia Parking Authority (PPA) regulated cab companies more heavily than ride-hailing services and was therefore unfair.
Drivers for Lyft and Uber could be liable for fines as high as $1,000 and have their vehicles impounded under current rules. However the PPA is able to decide how aggressively it chooses to enforce the regulations, according to the Philadelphia Inquirer.
Lyft said it was not given any notice or opportunity to be heard on the issue before the ruling. The company said in a statement that people in Pennsylvania "want access to ride-sharing, and we remain committed to finding a statewide solution that keeps this modern option available across the state."
Uber said that the state needed to act to find a way to make ride-sharing legal.
Ride-hailing companies have long been under fire in Philadelphia and in Pennsylvania, where they are effectively unregulated because current laws do not cover them.
To get around the issues during the Democratic National Convention, a temporary authorization bill legalizing ride-sharing services was passed but it lapsed September 30.