In the late 19th century, after hundreds of years of isolation, Seoul opened its gates to foreigners and began to modernize. Seoul became the first city in East Asia to have electricity, trolley cars, water, telephone, and telegraph systems all at the same time. Much of this was due to trade with foreign countries like France and United States. For example, the Seoul Electric Company, Seoul Electric Trolley Company, and Seoul Fresh Spring Water Company were all joint Korean-American owned enterprises. In 1904, an American by the name of Angus Hamilton visited the city and said, “The streets of Seoul are magnificent, spacious, clean, admirably made and well-drained. The narrow, dirty lanes have been widened, gutters have been covered, roadways broadened. Seoul is within measurable distance of becoming the highest, most interesting and cleanest city in the East.”
When the Empire of Japan annexed the Korean Empire, it utilized Seoul as the colonial capital. While under colonial rule (1910–1945), the city was called Keijo. Keijo was an urban city that had 2 wards: Keijo itself and Ryusan-ku. Gyeongseong was part of Gyeonggi Province, instead of being an independent city or prefecture as in Joseon and present days. In 1914, several outer districts of the prefecture were annexed to neighbouring Goyang County (now Goyang City, reducing the administrative size of the prefecture. In 1936, Gyeongseong expanded itself as it annexed Yeongdeungpo from Siehung County (Now Siehung City) and recombined some parts of former Gyeongseong districts (Sungin, Yeonghee, etc.) from Goyang County (now Goyang City). The Government-General Building served as the seat of the colonial government of Colonial Korea but was torn down in 1995.