Los Angeles (AFP) - Faced with a growing number of homeless people, Las Vegas has passed a controversial law that bans sleeping on the street and imposes 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 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.

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.

The measure has drawn criticism from beyond Las Vegas, including from several Democratic presidential candidates.

The explosion in the number of homeless people in the United States -- especially in California and New York, where housing prices have soared in recent years -- could become an issue in the 2020 election.

Las Vegas has tried to tackle the issue before. The city council has banned public food handouts, briefly closed public parks, and even banned sleeping within 500 feet (150 meters) of feces.

Former mayor Oscar Goodman, the husband of the current mayor, once even proposed shipping homeless people to an abandoned prison 30 miles outside the city, the USA Today newspaper said.