Lanfang Republic

The Lanfang Republic (, Pha̍k-fa-sṳ: Làn-fông Khiung-fò-koet), also known as Lanfang Company, was a kongsi federation in Western Borneo. It was established by a Hakka Chinese named Low Lan Pak in 1777 until it was ended by Dutch occupation in 1884.

Arrival of the Chinese
The sultans of Western Borneo, including Sambas, Sukadana, and Landak all imported Chinese laborers in the 18th century to work in gold or tin mines. A number of mining companies enjoyed some political autonomy, but Lanfang is the best known thanks to a history written by Yap Siong-yoen, the son-in-law of the last kapitan of the Lanfang Company, which was translated into Dutch in 1885, and J.J.M. de Groot, a Dutch Sinologist who recorded Lanfang's history with the help of its last President, Liu Asheng. None of the other Chinese mining organization in western Kalimantan left written accounts; the records of the others were documented by Dutch sinologists.

Rule of Low Lan Pak
The founding father of the Lanfang Kongsi was Low Fong Pak (羅芳伯), who hailed from Meizhou in Guangdong Province. Chinese settlers have long lived on Borneo, with most engaging in trading and mining. They formed their own companies, among which was the Southern Company headed by Low.

Low established the Lanfang Company in 1777 (with its capital in Mandor), and it quickly emerged as the leading government in the region. The settlers subsequently elected Low as their inaugural leader. At the beginning of the Low's leadership, he knew they wouldn't survive long on a land surrounded by Western colonizers. To seek protection, Low insisted on claiming Lanfang Republic as a company to seek asylum from the Qing empire. Unfortunately, the Qianlong Emperor didn't accept Low's proposal of becoming the Qing Empire's tributary state but accepted the trade agreement. After Low received the official response from Qianlong, he promptly showcased it as evidence of loyalty to the Qing Empire. This action effectively intimidated the Dutch, forcing them to cease their hostile activities against the Lanfang Republic temporarily. After Low secured the Lanfang Republic's future, he implemented many democratic principles, including the idea that all matters of state must involve the consultation of the republic's citizenry. The Republic did not have a standing military, but had a defense ministry that administered a national militia based on conscription. During peacetime, the populace mostly engaged in farming, production, trading, and mining. Lanfang's administrative divisions included three tiers (province, prefecture, and county) with the people electing leaders for all levels. Lanfang was allied with Sultan Abdurrahman of the Pontianak Sultanate.

Low served as head of state until his death in 1795. Afterwards, Lanfang members elected Jiang Wubo (江戊伯) as their next president. Lanfang citizens elected a total of twelve leaders, who helped improve agricultural techniques, expand mine production, develop cultural education, and organize military training.

Dutch conquest
In the mid-to-late 19th century, the Chinese Qing Empire weakened substantially. Thus, the Lanfang Company's vigorous development suffered from the eventual expansion of the Dutch. The Mandor community waged a tenacious resistance, but ultimately failed due to poor weaponry. Lin Ah Sin was the last leader of Lanfang. Many of Lanfang's citizens and their descendants made their way to Sumatra or Singapore. The three campaigns waged by the Dutch East Indies Army against the Lanfang Company: This last one resulted in the subjugation of the Chinese and the loss of autonomy.
 * Expedition to the West Coast of Borneo (1822–24)
 * Expedition against the Chinese in Montrado (1850–54)
 * Chinese uprising in Mandor, Borneo (1884–85)

Wary of Qing intervention, the Dutch did not openly annex the lands controlled by the Lanfang Company, and created another puppet regime. It was not until 1912, when the Qing Dynasty collapsed, that the Dutch proclaimed their occupation.