The term "Military of historic Sarawak" is a wide term to refer to Sarawak between 1599 and 1946.

History

Sultanate of Sarawak (1599–1641)

To prevent a war between Abdul Jalilul Akbar and his brother Ibrahim Ali Omar Shah, Abdul Jalilul Akbar created Sarawak to make his brother Ibrahim as far away from the capital, proclaiming Ibrahim as Sultan of Sarawak in 1599. After the establishment of the Sultan Tengah constructed a fortified palace in Sungai Bedil, modern day Kuching in 1599, turning the area into the royal, judicial and administrate capital of the kingdom.

Heading off for Sarawak, Sultan Ibrahim Ali Omar Shah took a total of one thousand men (Brunei people who reside in Kampong Saba) with him. These troops are made up of Sakai, Kedayan, and Bunut, three natives of Sarawak. Not only that, but he was also joined by Brunei's royal kin, who helped Sarawak establish a government. The Sarawak sultanate's administrative hub was decided to be in the Santubong region, with this decision, Sultan Tengah constructed a fortified palace in Sungai Bedil, modern day Kuching in 1599, turning the area into the royal, judicial and administrate capital of the kingdom. According to the Diraja Sambas account, the Sultan identified himself as Sultan Ibrahim Ali Omar Shah or Sultan Abdul Jalil.

Tengah also made large formal political unions amongst the Matan and Sambas kingdoms, with Sarawak likely had involvement with the Mataram invasion of Matan in 1622, as he only left Matan in either 1630, 1638 or 1641, although some sources conflict with this with him only landing in Matan in 1631 and stay there for seven years. He was soon struck by a Sakai with a broken harpoon as he paused to relief himself at Kampung Batu Buaya.

Sarawakian provinces (1641–1841)

After the death of Sultan Tengah, the Sultan of Brunei retook power, although he let the chiefs, who served Sultan Ibrahim to continue their roles, and which Sarawak would be controlled by a Datu Patinggi.

Antimony ore was discovered in Siniawan and Jambusan in 1823. The Bruneian sultan had appointed Ali as the governor of Sarawak in the 1820s. The Chinese mined antimony ore in Siniawan, while the Malays who resided in the Tonga Tanah used Bidayuh laborers. However, as soon as Sultan Omar Ali Saifuddin II Brunei realized that antimony ore and gold had been discovered in the Bau area, the Sultan named Pengiran Indera Mahkota as the new Governor of Sarawak in 1827, replacing Datu Patinggi Ali, allowing Brunei to take control of the antimony mines and commerce. The administrative center of Sarawak was relocated by Pengiran Indera Mahkota in 1826 from Lidah Tanah to Santubong and subsequently to Kuching. It is said that he moved the administrative center to Kuching using the fear of pirates as justification. However, a deliberate measure was taken to lessen Ali's influence and authority. The full control of mining activities and antimony trade in Bau was made feasible by Pengiran Indera Mahkota when they seized power from Ali to govern Sarawak.

Mullen, a supporter of Ali, said that Bidayuh and Malays were made to work long hours in the antimony mine. Before Pengiran Indera Mahkota arrived, he had been in charge of them for a considerable time. When he saw the misery of his followers—who were compelled to labor at Pengiran Indera Mahkota's antimony mine—he was reportedly angered. The insistence of Pengiran Indera Mahkota that his followers pay extremely high taxes infuriated Ali even more. Additionally, because Pengiran Indera Mahkota controlled all commercial activity, they could not trade as freely as before.

However following ten years of hardship as a slave worker, Datu Patinggi Ali rallied his supporters from Siniawan to oppose Pengiran Indera Mahkota. They began to resist in 1836. Datu Bandar, Datu Amar, and Datu Temenggong helped Ali. Patinggi Ali, one of Datu's disciples, first constructed defense fortifications in Siniawan, Lidah Tanah, and other locations—an additional location upstream Bau. They aimed to remove the Bruneian governor and liberate Sarawak from the Sultanate of Brunei's rule. In addition to setting up battle plans, he offered them encouragement and counsel. They put up a fierce fight with Pengiran Indera Makkota. They were still unable to vanquish Pengiran Indera Mahkota despite several battles. Similarly, Ali was defeated by Pengiran Indera Mahkota as well.

This conflict persisted and worsened in 1838 and into 1839. Ali received assistance, as the Sambas Sultan had pledged. Additionally, there was material indicating that the Dutch had prepared to assist the people of the Bau area in defeating the Pengiran Indera Mahkota. Pengiran Muda Hashim understood how tough it would be to overcome Ali's troops. James Brooke, an English traveler in Kuching at the time, was approached for assistance. Brooke and a few other Royalist crew members sailed up the Sarawak River to Siniawan in 1840. The ship was outfitted with contemporary weaponry. There were several conflicts and occasionally discussions with Ali. At last, Brooke was said to have defeated his army at the Lidah Tanah citadel with 600 part-time troops who were Iban, Malay, and Chinese.

The scarcity of food supplies at the time forced Ali's supporters to flee, and many of them—particularly the Bidayuh people—starved to death. The fact that Datu Patinggi Abdul Gapur and Datu Tumanggong Mersal fled to Sambas and Datu Patinggi Ali sought safety in Sarikei after Brooke put an end to the uprising demonstrated the Sultanate of Sambas' sympathy for the rebels. By late 1840, Datu Patinggi Ali had promised to terminate the conflict, but only if Pengiran Indera Mahkota and his family left Kuching. They were spared along with him and his supporters. The conflict with Pengiran Indera Mahkota ended with the aforesaid arrangement. In the end, he and his supporters were able to drive Pengiran Indera Mahkota and his family from Sarawak. At Belidah in December 1840, he submitted, knowing that Brooke would go on to rule an independent Sarawak, with the idea that Brooke would take over the role of Raja and put an end to his oppression by the Brunei Pengirans.

Raj of Sarawak (1841–1946)

In August 1845, Rear-Admiral Thomas Cochrane arrived at Brunei with a squadron of from six to eight ships to release two Lascar seamen who were believed to be hidden there. Badruddin accused Yusof of being involved in the slave trade due to his close relations with a notable pirate leader –Sharif Usman– in Marudu Bay and the Sultanate of Sulu. Denying the allegation, Yusof refused to attend a meeting with Cochrane, and escaped after being threatened with force by Cochrane before regaining his own force in Brunei's capital. Cochrane then sailed away to Marudu Bay in pursuit of Usman, while Yusof was defeated by Badruddin. Hashim managed to establish a rightful position in Brunei Town to become the next sultan after successfully defeating the pirates led by Yusof who fled to Kimanis in northern Borneo, where he was executed. Yusof was the favourite noble to the Sultan and with Hashim's victory, this upset the chances of the son of Sultan Omar Ali Saifuddin II becoming the next leader. Mahkota, after his capture in Sarawak in 1844 became the Sultan's adviser in Yusof's absence. He prevailed on the Sultan to order the execution of Hashim, whose presence had become unwelcome to the royal family, especially due to his close ties with Brooke that were favourable to English policy. Beside that, an adventurer named Haji Saman, who was connected to Yusof, played upon the Sultan's fear of Hashim taking his throne. By the order of the Sultan, Hashim and his brother Badruddin together with their family were assassinated in 1846. One of Badruddin's slaves, Japar, survived the attack and intercepted , which brought him to Sarawak to inform Brooke. Enraged by the news, Brooke organised an expedition to avenge Hashim's death with the aid of Cochrane from the Royal Navy with Phlegethon. On 6 July 1846, Sultan Omar Ali Saifuddin II complained through a letter about the discourtesy of HMS Hazard and invited Cochrane to ascend the capital of Brunei with two boats.

HEICS Phlegethon, HMS Spiteful and then moved up to the river on 8 July where they were fired on from every position with slight damage. Mahkota and the Sultan retreated upriver while most of the population fled upon their arrival at Brunei's capital, leaving the brother of the Sultan's son, Pengiran Muhammad, who was badly wounded and Pengiran Mumin, an opponent of the Sultan's son who despised the decision of his royal family to be involved in conflict with the British. The British destroyed the town forts and invited the population to return with no harm to be done to them while the Sultan remained hiding in the jungle. Another expedition was sent to the interior but failed to find the Sultan. Brooke remained in Brunei with Captain Rodney Mundy and along with the Phlegethon and HMS Hazard while the main expedition continued their mission to suppress piracy in northern Borneo.

Upon finding that Haji Saman was living in Membakut and that he was involved in the plotting that caused Hashim's death, HEICS Phlegethon and HMS Iris departed there destroyed Haji Saman's house and captured the town of Membakut although Saman managed to escape. Brooke returned again to Brunei and finally managed to induce the Sultan to return to the capital where the Sultan wrote a letter of apology to Queen Victoria for the killings of Hashim, his brother and their family. Through his confession, the Sultan recognised Brooke's authority over Sarawak and mining rights throughout the territory without requiring him to pay any tribute as well granting the island of Labuan to the British. Brooke departed Brunei and left Mumin in charge together with Mundy to keep the Sultan in line until the British government made a final decision to acquire the island. Following the ratification agreement of the transfer of Labuan to the British, the Sultan also agreed to allow British forces to suppress all piracy along the coast of Borneo.

World War II

Following World War I, the Empire of Japan began to expand their range in Asia and the Pacific. Vyner became aware of the growing threats and began to institute reforms. Under the treaty of protection, Britain was responsible for Sarawak's defence but it could do little, most of its forces having been deployed to the war in Europe against Germany and the Kingdom of Italy. The defence of Sarawak depended on a single Indian infantry battalion –the 2/15 Punjab Regiment– together with the local forces of Sarawak and Brunei. As Sarawak had a significant number of oil refineries in Miri and Lutong, the British feared that these supplies would fall to Japanese control, and thus instructed the infantry to carry out a scorched earth policy. On 16 December 1941, a Japanese navy detachment on arrived at Miri from Cam Ranh Bay in French Indochina. The Japanese then launched an air attack on Kuching on 19 December, bombing parts of the town's airfield while machine-gunning people in the streets. The attack created panic and sent residents fleeing to rural areas. The Dutch submarine managed to bring down the Japanese from Miri but, with the arrival of the together with other ships, the Japanese secured the town on 24 December. From 7 January 1942, Japanese troops in Sarawak crossed the border of Dutch Borneo and proceeded to neighbouring North Borneo. The 2/15 Punjab Regiment were forced to withdraw to Dutch Borneo and later surrendered on 9 March after most of the Allies had surrendered in Java. A steamship of Sarawak –the – was sunk while evacuating nurses and wounded servicemen in the aftermath of the fall of Singapore. Most of its surviving crew were massacred on Bangka Island.