CUMBERLAND COUNTY, Va. (CBS19 NEWS) -- As an embattled company prepares to shut down an animal breeding facility in Virginia, it will be allowed to sell some of the animals in its care.

That's according to a ruling from a federal court on Friday, which allows ENVIGO to fulfill existing orders for animals it has bred.

Judge Norman Moon said that though the motion for a preliminary injunction against ENVIGO was mostly uncontested, he determined that it could not be used to prevent the company from fulfilling its existing contracts.

This means more than 500 dogs will be removed from the facility within the next 30 days to complete those ongoing pharmaceutical research contracts.

These contracts need to have been executed prior to the temporary restraining order that was issued on May 21

There are more than 3,000 dogs currently at the facility in Cumberland County. There has been a push to have all of the animals made available for adoption, but there is no word at this time if that will happen.

Per the court ruling, ENVIGO has seven days to address issues regarding the spaces where the dogs live, the food they eat, and their veterinary care.

The facility is also ordered to immediately stop any breeding activities at the Cumberland County facility.

The full ruling can be viewed below: