The owner of a nine-unit apartment building on Charles Street won city approval this week to convert it into a hotel - like it was before he bought it several years ago.

At a hearing on Tuesday, the Zoning Board of Appeals gave owner Brent Berc permission to reconvert 94 Charles St. into nine hotel units, serving mainly people getting care at nearby Mass. General and their family members and other people in Boston for family visits.

Berc, who bought the building in 2012, had already been renting out the nine units via Airbnb and other rental services. He decided to go back to the building's days as the Charles Street Inn after learning about Boston's new regulations on short-term rentals, approved in June.

Berc is not planning any changes to either the exterior or interior of the building.

The proposal was supported by the mayor's office. The Beacon Hill Civic Association voted to not oppose the proposal.