Kuala Lumpur was founded in 1857 at the confluence of the Gombak and Klang rivers. In Malay, the name literally means "muddy confluence". The settlement started when a member of the Selangor royal family, Raja Abdullah, opened up the Klang Valley for tin prospectors. 87 Chinese prospectors went up the river Klang and began prospecting in the Ampang area, which was then a thick jungle. Despite 69 of them dying due to the pestilential conditions, a thriving tin mine was established. This naturally attracted merchants who traded basic provisions to the miners in return for some of the tin. The traders set up shop at the confluence of the Klang and Gombak rivers. Thus, a city was born.
As the town grew, the British, who ruled Malaya at the time, felt they needed to appoint a headman (Kapitan Cina or Chinese Kapitan, or Captain of the Chinese) to administer the settlement and ensure law and order. The first Kapitan Cina was Hiu Siew. It was the third Kapitan Cina, Yap Ah Loy, who oversaw the rise of Kuala Lumpur from a sleepy little mining town to become the foremost city of Selangor. In the early years, Kuala Lumpur was the centre of the Selangor Civil War, in which two conflicts could be discerned; a fight between Selangor princes over the revenue of tin mines, and the other one a vendetta between Kapitan Yap and Chong Chong, who wanted the Kapitanship.
Kapitan Yap and his backer, Tengku Kudin, were successful and it was from then, Kuala Lumpur became Selangor's biggest city. He rebuilt Kuala Lumpur, which was devastated by the Civil War and repopulated it with Chinese miners from elsewhere in Selangor. He also encouraged Malay farmers to settle near Kuala Lumpur in order to have a steady and accessible source of food.
It was made capital of Selangor in 1880 due to Kapitan Yap's success. He gave Kuala Lumpur a system of frontier justice which effectively maintained law and order and ensured that Kuala Lumpur became the centre of commerce in Selangor. After Kuala Lumpur burnt down in 1881, Kapitan Yap decided to rebuild Kuala Lumpur in brick and tile to replace the dangerous attap houses. He set up Kuala Lumpur's first school and a shelter for the homeless. Yap's Kuala Lumpur was very much a rough frontier town as Yap himself was a member of the Hai San triad and gang warfare was common. Kapitan Yap licensed brothels, casinos and drinking saloons.
Sir Frank Swettenham was at this time appointed Resident of Selangor and he was the person responsible for making Kuala Lumpur the seat of administration of Selangor. It was under his rule that after Kapitan Yap's death the city continued to prosper. When the Federated Malay States were incorporated with Swettenham in charge in 1896, Kuala Lumpur was made the capital.
Most of central KL has grown without any central planning whatsoever, so the streets in the older parts of town are extremely narrow, winding and congested. The architecture in this section is a unique colonial type, a hybrid of European and Chinese forms.
During World War II Japanese forces captured Kuala Lumpur on January 11, 1942 and occupied the city for 44 months.
Kuala Lumpur was occupied by Japanese from January 11, 1942 to August 15, 1945. The period, called "3 years and 8 months", almost halted the economy of Kuala Lumpur.
During the Japanese Occupation, the military launched numerous policies such as the selective policy where the ethnic Chinese were treated badly because they supported the Chinese Government during the First Sino-Japanese War in 1895 and the Second Sino-Japanese War in 1937. On the other hand, the ethnic Malays and Indians were treated fairly well so that they would co-operate in order for the Japanese to continue administering Kuala Lumpur. On the other hand, the Japanese Social Policy was also used by the Japanese Military Administrative. In the policy, all English and Chinese schools were ordered to close down and every morning in schools, Kimigayo (the Japanese National Anthem) had to be sung to show loyalty to the Japanese Emperor.
While the Japanese Military occupies Kuala Lumpur, the Japanese Military Yen or commonly known as Banana notes were introduced. Due to currency without reserves issued by the Japanese Imperial Army administration and over printing of Japanese Military Yen, hyper-inflation occurred, and food rationing became the norm of daily lives.
In 8 and 9 August 1945, atomic bombs were dropped on the two Japanese cities of Nagasaki and Hiroshima causing General Seishirō Itagaki (General of Japanese Military Administrative) to surrender to the British in Kuala Lumpur.
After the fall of Japanese, the British Military Administration returned to Kuala Lumpur. On 1 April 1946, the British officially declared Malayan Union administrate Malaya and Kuala Lumpur in King's House (now known as Carcosa Seri Negara).
Kuala Lumpur was one of the first cities to hold an election. The first election was held on February 1952, resulting in the United Malays National Organization–Malaysian Chinese Association joint party winning 9 seats out of 12 seats.
Kuala Lumpur gained historical significance again in 1957 when the first Malayan flag was raised on the grounds of the cricket field, Merdeka Square, to mark the country's independence from British rule. Kuala Lumpur came of age in 1974, when it was formally detached from its mother state of Selangor and made into a unit of its own called the Federal Territory.