This file photo from April 2016 shows a woman browsing the site of home-sharing giant Airbnb. (John MacDougall/AFP/Getty Images)

Arlington County homeowners who offer a room or a house to short-term renters through online companies such as Airbnb will be able to do it legally, starting Dec. 31, so long as they get a license, the Arlington County Board voted Saturday.

The legalization of the widespread practice — 659 hosts had 1,041 rentals available on Saturday — brings with it a requirement that the unit be owner-occupied for at least half the year, with each set of visitors limited to 30 days or fewer. The board approved the measure 4 to 1.

The county license, which won’t cost anything for the next six months, requires owners to attest that their home meets state building codes, that they will be on call while the home is rented, and that the property has fire and smoke detectors and a fire extinguisher. Just six people per unit, or two per bedroom, will be allowed during a rental period.

Libby Garvey (D), the board chair, said the code revision was necessary to get registration and regulations in place before the presidential inauguration in January, when an influx of visitors and protesters is expected in the region. The board also was trying to beat the state to the punch; the General Assembly clashed earlier this year over how to regulate the industry, voting to give preliminary approval to a policy that won’t take effect until a study is completed and lawmakers have a chance to vote again in early 2017.

Some residents, and board member John Vihstadt (I), objected that the process was too rushed. In a county that ordinarily takes a half-year or more to collect community feedback, this set of regulations was proposed, discussed and passed in less than three months.

Vihstadt, the sole member to vote against the proposal, said he had “serious reservations” with it, calling it an overreach and not flexible enough. He tried without support to delay the vote until the board’s Jan. 28 meeting.

Airbnb praised the county for removing limits on how many units in a multifamily building could rent at once, and for agreeing to streamline the permitting process.

“We look forward to using this ordinance as a model for shaping sensible home-sharing guidelines across the commonwealth of Virginia and the entire Washington, D.C., metropolitan area,” a company spokeswoman said.

In late January, the board will consider allowing renters to sublet their units, although county officials warned that many older apartment buildings will not qualify for the new home-sharing use because they do not meet current building codes. In addition, any condo association, homeowners association or privately owned building can bar owners and renters from home-sharing.

There will be no cost for the year-long county license at first, but that will probably change in the next fiscal year, which starts July 1. County Manager Mark Schwartz said whatever fee is assessed will cover administrative costs.

Fourteen speakers told the board that they wanted rules put in place to make the short-term rentals legal, but they also wanted strict county attention to complaints.

Jennifer Frum, 76, said her three-year experience of renting out rooms in her Arlington Ridge neighborhood home had been “very positive. ” Ryan Michie said he met “the love of his life” through the home-sharing experience, and David Lippert said among the 100 people he hosted during the past year and a half was a baby born prematurely to one of his visitors.

Others said residential buildings were not designed for and should not allow commerce such as the rentals. Dorinda Fitt said she awoke one night to find a loud argument going on across the street, among six strangers who were Airbnb renters. Dusty Horwitt said someone in his Columbia Pike condo community advertised that renters could use the common laundry, swimming pool and gym, raising concerns among his neighbors about their own safety.

Board member Katie Cristol (D) championed the rules, promising to “be vigilant” on behalf of both those renting their units and neighbors who are worried about the impact on their property, safety and peace of mind. Vice Chairman Jay Fisette (D) called the new rules “fair, purposeful and minimal.”