ROANOKE COUNTY, Va. – It's now illegal to spend the night in your car in Roanoke County.

Tuesday, the Roanoke County Board of Supervisors approved a new ordinance that prohibits anyone from sleeping or living in a car, even on private properties.

If you're caught, you could face up to a $250 fine.

However, the new law does not apply to napping. If you need to pull over for a nap to travel safely, you will not be prosecuted.

County officials say when people sleep in cars, it makes neighborhoods look bad, it's a safety concern and presents several health issues. They added that there's only been one case recently.

"No, it's not a major, ongoing problem. Just an occasional issue that has been brought to our attention," said Peter Lubeck, a senior assistant attorney for the county.

The law goes into effect immediately.

Roanoke County sent WSLS 10 a statement to further explain the purpose behind the new law:

"The purpose of the ordinance is to enable our staff to intervene in serious cases where people are using their automobiles for an extended period of time as sleeping quarters, in place of a residence, hotel or other accommodations. Most importantly, our concern is for the health and safety of the person living in this type of situation, particularly during the cold winter months. Enforcement of the ordinance will be complaint-driven, and individuals in need will be provided with information regarding resources to aid them in their situation. The ordinance does not prohibit short-term napping in vehicles."