Las Vegas has passed a law banning sleeping on the street if there are places in homeless shelters available.
To combat the growing number of homeless people in the city, the new law will impose punishments of a $1,000 fine and six months in prison.
The ordinance – the latest in a series of measures by US cities to grapple with rising vagrancy – comes into force on Sunday, but its criminal provisions will not be applied until February.
Sleeping on the streets of the gambling hub will only be illegal in downtown Las Vegas and residential areas – not the famous casino "Strip," which comes under a different jurisdiction.
It will not apply when homeless shelters are full.
Opponents of the law focused their anger on Las Vegas Mayor Carolyn Goodman before and during the vote late Wednesday.
Demonstrators outside City Hall chanted "Housing, not handcuffs" and held signs proclaiming "Poverty is not a crime," local media reported.
Ms Goodman said the law is necessary for a city that is highly dependent on tourism revenues and to protect "the health and safety of the entire community."
The law is not intended to punish the homeless but to help with their reintegration into society, she said, according to NPR radio.
It has been backed by Las Vegas’s Chamber of Commerce.
According to the latest census, 5,500 people sleep on the streets of southern Nevada each night. Only 2,000 beds are available through municipal services and charities.