The ancient capital of Kyoto has long been a tourist mecca, attracting domestic and international travelers to its World Heritage-designated temples, shrines and rock gardens. From the city’s traditional geiko (geisha) quarter of Gion to Kinkakuji, the Golden Pavilion, Kyoto’s has few rival few cities anywhere in the world when it comes to cultural treasures.

For centuries, Kyoto, home of the emperor, was a forbidden city, inaccessible to the outside world. Foreign travelers passing through Japan in the 17th through the 19th centuries were not allowed to step foot in it. As late as the early 1870s, Westerners in Japan’s treaty ports such as Yokohama and Kobe were prohibited from visiting the city unless they had special permission — which was rarely granted. One report, published in a 1918 history of the opening of Kobe Port, suggested that, until an 1872 international exhibition in Kyoto, no more than a dozen Westerners had ever seen it.

In the 19th century, the idea that Kyoto would someday become one of the world’s most popular tourist destinations with a highly developed infrastructure catering to international visitors would most likely have been dismissed as a fantasy. But by 2014, international media such as Travel +Leisure magazine were calling Kyoto the world’s best city to visit (an honor the city won again a year later).