After 41 years of welcoming tourists from around the world, Jan de Gier says it's "time for a new generation." The final guests will check out of the Inn on Castro on May 6.

The inn occupies a restored Edwardian building at the intersection of Castro and Market streets. It's impressively popular with those who've stayed in one of its eight rooms or two apartments; the bed and breakfast has a perfect score on TripAdvisor with 853 glowing reviews, making it the number one B&B or inn in San Francisco on the travel review site.

The inn was first started in the late 1970s by owners Sam and Joel Roman, explained de Gier, before he and his partner Jim Frizzel bought the property 33 years ago. Eight years after they purchased the bed and breakfast, Frizzel died suddenly of skin cancer.

"Since then, I have made it to what it is today. A lot has happened over those years," said de Gier — certainly an understatement.

He reflected on the early years of business, when it was less safe and less common to be openly gay. "Bohemian is what you called it," he said.

ALSO: Beloved Northern California glassware company abruptly shuts down

Through the AIDS crisis, as thousands lost their lives, the Inn on Castro continued to host guests, the vast majority of them gay. Today, de Gier says the mix of guests is about half straight and half LGBT. Another memorable chapter in the inn's life came in the early 2000s during the expansion of the transgender rights movement. Pioneering surgeon Douglas Ousterhout would perform facial feminization surgeries on transgender patients at his office up the street. The patients would recuperate from the invasive surgery at the Inn on Castro.

For decades, the inn has been a constant in rapidly changing San Francisco.

De Gier says the house has already been sold, and the new owners plan to use it as a residence. The inn's art collection will be put up for auction.

"The value of the building is higher as a home than an inn," he said.

As for de Gier, it sounds like he's looking forward to retirement: "It is time for me to smell the roses and make some memories. An era stops. A new one starts for the next generation."

Read Alix Martichoux's latest stories and send her news tips at alix.martichoux@sfgate.com.