Weihai (), formerly called Weihaiwei (), is a prefecture-level city and major seaport in easternmost Shandong province. It borders Yantai to the west and the Yellow Sea to the east, and is the closest Chinese city to South Korea (specifically, Chengshan to Yeonpyeongdo, 174km). Weihai's population was 2,804,771 as of the 2020 Chinese census, of whom 1,164,730 lived in the current built-up (or metro) area of (Huancui District) even though Wendeng district to the south with 563,529 inhabitants is soon being conurbated. There are two county-level cities within Weihai; Rongcheng has a built up area with 714,211 inhabitants, while Rushan had 464,078 inhabitants in 2020. A subway is planned with 4 lines and route length to link all city districts. The first phase, Line 1 and 2 is planned for 2025. History Prehistorically, it was inhabited by Dongyi tribes, and it was annexed into China Proper by the state of Qi in 567 B.C. Before the 14th century, Weihai was a minor fishing settlement. In 1398, during the Ming dynasty, it became a military stronghold (wei) to defend against raids by the wokou. The fortification at Weihai was constructed in 1403, and contained walls almost 2 miles (3.2 km) in circumference. Weihaiwei was the base for the Beiyang Fleet during the Qing Dynasty. In 1895, the Japanese captured it in the Battle of Weihaiwei, which is regarded as the last major battle of the First Sino-Japanese War. The Japanese then evacuated Weihaiwei on 24 May 1898, after which it was occupied by the British. The core of Weihai (now Huancui District) was ruled by the British from 1 July 1898 to 1930 under lease agreement with the Chinese empire, with Port Edward (the center of the original Weihai city, now in Huancui District) serving as the capital. A Royal Navy base was built on Liugong Island. Weihaiwei became a special administrative region after it was returned to the Republic of China on 1 October 1930, but Liugong Island and its facilities were leased back to the U.K. until 1940. Weihaiwei was occupied by the Japanese from 1938 to 1945. There was a withdrawal of most British forces and supplies from Liugong Island, and finally a Japanese military landing and occupation of the island in 1940. The region was formally incorporated into Shandong province on 10 May 1945. In 1949, Weihaiwei City was established, and its name was shortened to Weihai