The Denver City Council late Monday passed a measure to allow short-term rentals in private residences, after two years of discussion and community input on the issue.

The measure gives owners the ability to rent out a primary residence for less than 30 days. The new rules, which take effect July 1, will let owners rent out individual rooms or garage apartments on quiet residential blocks to people to use while traveling. Also, the homes can be rented out when the owner is away.

The council approved the measure 9-2, with Kevin Flynn and Rafael Espinoza voting against it. Council members Debbie Ortega and Robin Kniech were absent from the meeting.

The council also considered expanding the proposal to allow short-term rentals in second homes and investment properties. Despite growth in recent years, the new restrictions on the estimated 2,000 Denver listings that fit that model on websites such as Airbnb and VRBO would significantly cut that number, said those who oppose restrictions on the rentals.

The expanded piece was not included in the ordinance that passed Monday.

“Denver is undergoing dramatic and sometimes traumatic change,” said City Councilwoman Kendra Black. “I think we need to ease into this and see how it goes.”

More than 60 people signed up to speak on the issue during a public hearing. Predictably, those who support expanded short-term rentals were mainly people who already have them and didn’t want them limited to primary residences. Those who opposed were from established neighborhoods, but they said the restrictions would be better than nothing.

Sherri Way of the West Washington Park said a short-term rental “undercuts the fabric” of the neighborhood. The renters don’t send their kids to area schools and don’t help the elderly, she said. But if the city does move a measure forward, she favors the primary-residence provision.

But Brenda Beard said expanded short-term rentals are good for the economy. “We need to encourage tourism in our city,” she said.

Other cities, including Aurora, are also considering measures to regulate short-term rentals.