Responding to the request, Brooke succeeded in controlling the uprising in Sarawak.
Subsequently, Brooke was appointed Governor of Sarawak and he became a close friend with the pengiran.
The friendship between James Brooke and Pengiran Muda Hashim
The close relationship between Brooke and the pengiran was in fact not favourable to his nephew Sultan Omar Ali Saifuddien II and some of the royal family members of the Brunei Sultanate.
Just like Brooke, Pengiran Muda Hashim was against piracy and the slave-selling business. However, it was believed that part of the sultan’s income derived from the profits of selling slaves. The sultan accused his uncle and his family of being pro-English.
So in 1844, the Sultan summoned Pengiran Muda Hashim and his whole family to return to Brunei.
The pengiran returned home accompanied by his friend Brooke on board HMS Samarang.
Upon arriving in Brunei, the pengiran discovered that the role of Bendahara (similar to Prime Minister) originally meant for him, had been taken by Pengiran Yusuf.
Despite this, the pengiran still decided to stay on in Brunei as it was his home.
After a while, however, tensions started to rise between Pengiran Muda Hashim and Pengiran Yusuf.
The peak of the tension
The tension between Pengiran Yusuf and Pengiran Muda Hashim reached its peak on June 3, 1845 when civil war broke out between them.
Pengiran Muda Hashim was assisted by one of his brothers Pengiran Badruddin.
The battle took place in an area called Barakas, Brunei. The brothers brought along 1,000 soldiers from the Kedayan tribe while the Bendahara had about 300 loyal followers.
By sheer numbers alone, Pengiran Yusuf was defeated in the battle and he fled to Kimanis in current-day Sabah.
After the battle, the Sultan reluctantly appointed Pengiran Muda Hashim as the Bendahara and named him as his heir to the throne.
This event caused the previous heir to the Sultan’s adopted son, Pengiran Temenggung Pengiran Anak Hashim, to feel threatened, enough to finally make a plan for the murder of the pengiran.
The murder plot against Pengiran Muda Hashim
Owen Rutter in The Pirate Wind detailed the murder plot against Pengiran Muda Hashim and his family.
According to Rutter, the man assigned to execute the coup against the newly appointed Bendahara was a commoner named Haji Saman.
Rutter wrote,“Without warning, and in the dead of night, forty or fifty armed men surrounded the house of Pengiran Muda Hashim, set fire to it in several places then began a general attack.”
At first, the pengiran managed to escape with his wife and children while some of his brothers were killed.
When Haji Saman and his followers caught him, he persuaded them to allow him to send a message to the Sultan begging for his life.
But the Sultan refused to spare his life. Together with his surviving family and followers, Pengiran Muda Hashim retreated to a vessel. An explosion happened on the vessel killing almost everyone except for the pengiran. Determined not to be taken alive by his enemies, Pengiran Muda Hashim ended his life by shooting himself in the head with a pistol.

James Brooke mourns his friend Pengiran Muda Hashim
Meanwhile, in Sarawak, Brooke was not informed about the death of his friend.
Japar, one of Pengiran Badruddin’s slave boys had survived the attack. He tried to relay his master’s last message to Brooke but was unable to escape from Brunei.
Japar eventually made his way to board a British warship HMS Hazard that took him to Sarawak to meet with Brooke.
After much difficulties, Japar reached Kuching on Mar 30, 1846. It was from Japar that the White Rajah finally found out about the bloody coup.

Regarding the death of Pengiran, the first White Rajah’s feelings are best described in his own words. Here is an excerpt from his journal dated Apr 1, 1846:
“It is impossible for me to describe the indignation which I feel at this almost unheard of butchery of every member of the royal family known to be well-inclined to the British policy.
This infamous act has sealed the most flagrant breach of treaty entered into with Her Majesty’s government with the blood of the Sultan’s nearest relatives, and His Highness has now openly declared that he is prepared to fire upon the British flag whenever it shall appear near the defences which he is erecting.
Had this dreadful event arisen out of any source of internal struggle for sovereignty or power, however much to be regretted, it would not have rendered me so miserable as this fearful intelligence has now done.
Sure Her Majesty’s Government will well consider the case. It is beyond a doubt that the treachery and bad faith of the Sultan has resulted entirely from the fidelity of the Pengiran Muda Hashim, and of Pengiran Badruddin, to their engagements and the treaty entered into with the British authorities in these seas.
What other object can the Sultan have in placing himself in a position of such decided hostility to the British Government than a determination to have again recourse to the former atrocious system of a piracy and murder?
No less than thirteen of the members of the royal family have been massacred; and that the vicious sovereign gave his consent, if he did not directly order these murders, is clear on the face of the evidence before me.
Had I the power I would destroy both the city and Sultan, or at least would depose him; then if possible I would rescue the son of Muda Hashim and his surviving brothers, and place them in a fresh locality, and commence de novo with a better government under my own supervision.
I can write no more, my poor, poor friends, how sad and melancholy has been your fate! Never, never can I forget it. The regret, the indignation which I feel overpowers me.”