We knew it was coming, but Japan has officially greenlighted new legislation that legitimizes home-sharing startups such as Airbnb.

Airbnb, the well-funded and profitable San Francisco startup that has emerged as the poster child for the home-sharing industry, has already been operating in Japan for a while now, but under questionable legal status. The legislation has been weaving its way slowly through Japan’s governing bodies, with Prime Minister Shinzo Abe’s cabinet approving the new rules back in March. The final hurdle was Japan’s National Diet legislature, which has now given the go-ahead.

One notable facet of the new legislation is that private home-sharing is permitted for up to 180 days a year, or roughly six months. This restriction effectively prevents hosts from letting out their home for more extended periods of time, and thus targets absent landlords who use home-sharing platforms for long-term rentals.

The Japanese legislation is actually fairly generous compared to other markets, with the likes of San Francisco and London serving 90-day annual rental limits. And with two major international events coming up — the 2019 Rugby World Cup and the Tokyo Olympics a year later — Airbnb will be delighted to have settled any lingering doubts about its legality in the country.

“This is great news for the thousands of Japanese residents already hosting on Airbnb and provides much-needed clarity and certainty for locals who want to earn additional income by sharing their extra space with travellers from around the world,” Airbnb noted in a statement.

Even though question marks have hovered over Airbnb’s long-term viability in the country, the company said that Japan is its number one market in Asia Pacific for rentals and sits in its top 10 globally, claiming to have generated around $8.3 billion for the Japanese economy in 2016 alone. Airbnb added that five million guests used its service over the past 12 months — double the previous year — courtesy of its 52,000 listings.