Hakodate (Japanese: 函館市) is a city in Oshima subprefecture, on the island of Hokkaido in northern Japan. It covers 677.89 sq km (261.73 sq mi) and has a population of 280,000 people (2012 estimate).
Hakodate dates back to 1454, when it was an Ainu fishing village. Local chieftain Kono Kaganokami Masamichi built a manor house here. By the 18th century, it had grown into a port under the Tokugawa shogunate. This was where Commodore Matthew Perry arrive with a fleet of US ships in 1854.
Hakodate was one of the few cities in Japan which was allowed entry by Europeans. As a result it received European influences and culture, as reflected in the presence of the churches in the city. Hakodate was given city status on 1 August, 1922. On 1 December, 2004, it annexed the town of Minamikayabe, Esan and Toi, and the village of Todohokke, nearly doubling its size in the process.
You can fly to Hakodate Airport from major cities in Japan. From there, take the bus to Hakodate (20 minutes, ¥300). You can also take the train from Tokyo, though you have to change trains at the Shin-Aomori Station. The whole journey takes 6 hours and costs ¥19,200.