The Ming Court Affair was a political coup in Sarawak, Malaysia that began in 1983, developed into a full-blown political crisis during the 1987 state election, and ended after the Sarawak Malaysian People's Association (PERMAS) was dissolved in 1991. This political crisis mainly involved the dispute between Abdul Rahman Ya'kub (former Sarawak chief minister) and his nephew Abdul Taib Mahmud (chief minister of Sarawak) over the control of the state government and Sarawak's natural resources.

1983 Abdul Rahman Ya'kub was the third Sarawak chief minister, ruling from 1970 to 1981. He left his chief minister post to his nephew Abdul Taib Mahmud in 1981. Abdul Rahman then proceed to assume the ceremonial post of Governor of Sarawak from 1981 to 1985. Abdul Rahman had advocated his nephew for the chief minister post but the relationship soon turned sour after two years. This was because Abdul Rahman wanted Taib to take his advice while running the state government. Rahman's loyalists in Sarawak cabinet also tried to direct the distribution of the state's natural resources and the operation of governmental agencies according to Rahman's wishes. Taib continued Rahman's governing policy and inherited the whole Sarawak cabinet intact from his uncle. However, Taib soon grew frustrated with his uncle's control. Taib slowly replaced Rahman's loyalists with his own men. This has resulted in Rahman's displeasure over Taib.Syam, M.F (2012). In Domination and Contestation: Muslim Bumiputera Politics in Sarawak. Institute of Southeast Asian Studies. p. 124-141, 148, 153-159. . Google Book Search. Retrieved 1 February 2015.

During the opening ceremony of Tanjung Kidurong port of Bintulu in September 1983, Rahman criticised the federal government for breaking its promise of building a new airport in Bintulu while Taib was trying to deliver his own speech. Taib felt embarrassed by the action of his uncle and left the stage while his uncle was still speaking. Taib later made a public apology on the incident and handed over his resignation letter to Abdul Rahman. Rahman declined the resignation of Taib because Rahman himself also handed over a resignation letter to Yang di-Pertuan Agong to vacate his governor's seat. However, Rahman was persuaded by Yang di-Pertuan Agong to stay until his term expires in April 1985.

1983 PBB general assembly In September 1983, triennial general assembly of Parti Pesaka Bumiputera Bersatu (PBB) was held. Taib Mahmud, who was the president of the PBB party, tried to secure his own position by not allowing the president and one of the two deputy presidents posts being contested. He allowed one deputy president seat (Bumiputera wing) to be contested but later regretted it because Taib worried that Rahman's men would win the deputy president seat, thus challenging Taib's authority in the party. Taib stopped the party elections except for lower level Supreme Council seats of the Bumiputera wing. Subsequently, a motion was tabled in the general assembly to authorise Taib to appoint a suitable deputy president for the post. Rahman's faction objected the motion. From then, Rahman's faction started to attack Taib Mahmud. Matu-Daro PBB branch, formerly headed by Abdul Rahman, tabled a motion to form Sarawak United Malays National Organisation (UMNO) by merging all the bumiputera parties including PBB to order to curb Taib's power in the party. However, federal UMNO leaders such as Musa Hitam said that Sarawak Barisan Nasional (BN) was still strong and thus there was no need of UMNO in Sarawak. However, unknown to Rahman supporters, Taib already made a secret agreement with then prime minister of Malaysia, Mahathir Mohamad that the UMNO would not enter Sarawak as long as Mahathir remains as Malaysian prime minister and Taib remains as chief minister of Sarawak. Salleh Jafaruddin (Rahman's nephew) used the General Assembly to mention that Rahman's speech during the opening of Bintulu port was actually not offensive to Taib and Taib should not respond negatively to the matter. However, he also praised Taib for making an apology to Abdul Rahman and reminded Taib he should respect the elders such as Abdul Rahman.

1984-1985 PBDS and the federal government response Rahman and his supporters also tried to garner the support of non-Muslim Bumiputera community especially the Dayaks by feeding them with issues of Taib's policy in marginalising the Dayak community. These issues has led to the support of Parti Bansa Dayak Sarawak (PBDS) towards Abdul Rahman. Besides, Taib Mahmud also grew uncomfortable with Leo Moggie (president of PBDS and Federal Minister of Energy, Post, and Telecommunications) intimate relationship with the then Malaysian prime minister Mahathir Mohamad. Therefore, Taib Mahmud hinted Daniel Tajem (deputy president of PBDS) to take over the president post from Leo Moggie but it fell on deaf ears. Rahman's supporters also tried to create a crack in relationship between Taib and the federal government by criticising the federal leaders for ignoring Sarawak needs:

In response to these criticisms, the federal government announced several new projects such as the establishment of RM 400 million Universiti Pertanian Malaysia (UPM) campus in Bintulu. Taib defended the federal leaders by arguing that the prime minister has a strong sense of national integration so the federal government would not marginalise Sarawak. Taib also asked for people's patience in waiting for development projects in Sarawak.

Personal attacks against Taib Mahmud In early 1985, Abdul Rahman wrote a personal letter to Taib Mahmud which was later copied to Malaysian prime minister Mahathir Mohamad. Rahman ended the letter with:

However, Mahathir refused to interfere with the matter. After Rahman stepped down from his Governor post, he was not happy with Taib's choice of new Governor Ahmad Zaidi Adruce because Ahmad Zaidi was believed to have a connection with Indonesian rebels during Indonesia–Malaysia confrontation. Rahman started to question Taib's faith in Islam by accusing Taib of practising Bomohism (a traditional Malay belief in spirits and black magic) in great detail:

In response to Rahman's accusation, Taib argued that nobody has the right to question his faith because only God could judge him.

Taib Mahmud's response In response to criticisms of Abdul Rahman and his supporters, Taib Mahmud, as the president of PBB, removed Salleh Jafaruddin from his PBB's deputy secretary-general post. A Taib loyalist, Wan Madzihi Wan Mahdzar, became the new deputy secretary-general. In November 1985, Taib also suspended Wan Habib Syed Mahmud from PBB's vice-president post, Haji Balia Munir from publicity chief, and Haji A.S. Jaya from assistant-publicity chief. Adenan Satem, a Taib loyalist, became the new publicity chief.

Taib also started to reshuffle his cabinet in 1985 by creating three new ministries and abolishing two others. Taib placed the newly created Ministry of Resource Planning under him so that he could control the distribution of timber concessions. Taib retained the portfolio firmly under him until his retirement in 2014. Such power of distributing timber concessions was previously held under a Rahman loyalist named Noor Tahir. Noor Tahir was later given a less important portfolio which was Ministry of Environment and Tourism. Hafsah Harun, another Rahman loyalist, was given the portfolio of Minister of Social Development.

1986 Rahman supporters' response In April 1986, Salleh Jafaruddin resigned from his state assembly seat of Oya and ceased to become a member of the PBB party because he could not tolerate the leadership of Taib Mahmud any more. This was because organisers blocked him from attending special assembly of PBB Oya branch although he was the branch chairman. Saadi Olia (Kuala Rajang) and Wan Habib Syed Mahmud (Balingian) soon follow suit and resigned from the party but they kept their own state assembly seats.

Wan Habib and Saadi Olia later set up a new party named United Sarawak Natives Association (USNA) in 1986. Wan Habib became the president of the party while Salleh became the secretary-general. Salleh Jafaruddin's resignation from the state assembly seat of Oya had resulted in a by-election held on 1 and 2 July 1986. Salleh had to contest for the seat as an independent because his party cannot be registered on time. He contested against Wan Madzihi Wan Mahdzar who was the deputy secretary-general of the PBB party. Salleh subsequently lost the seat to Wan Madzihi.

1986 parliamentary election During the August 1986 Malaysian general election, all the Sarawak Barisan Nasional component parties were able to win all the seats contested except for SUPP. SUPP lost 2 seats (Serian and Rajang) to independents and 1 seat (Bandar Kuching) to Democratic Action Party (DAP). Sarawak National Party (SNAP) lost 4 seats to PBDS. Both SNAP and PBDS were component parties of Barisan Nasional at that time. There was only a marginal decline for the number of popular votes garnered by Sarawak BN. During the election, Simunjan and Mukah were considered hotly contested seats. Wan Habib (USNA) contested for the Simunjan seat but lost to Bujang Ulis (PBB). Salleh Jafaruddin (USNA) contested for Mukah but lost to Leo Michael Toyad (PBB). Meanwhile, Taib Mahmud won a landslide victory against an independent in Kota Samarahan. Overall, the total number of popular vote garnered by PBB in Muslim bumiputera seats decreased from 77.56% in 1982 election to 68.15% in 1986 election.

1986 PBB general assembly PBB general assembly was held in September 1986 soon after the parliamentary election. Taib decided that top posts would not be contested to prevent a further split in the party. However, the deputy president post was still vacant since the last party election. By this time, most of the Rahman supporters were out of the party. Taib decided to open the deputy president post for contest. Sulaiman Daud and Abang Abu Bakar contested for the seat. However, Taib openly endorsed Abu Bakar for the seat. As a result of Taib endorsement, Abang Abu Bakar won the contest, polling 370 votes against the 131 votes by Sulaiman Daud. Besides, 7 vice-president posts and 15 supreme council members were also opened for contests. Abang Johari Tun Openg received the highest number of votes, followed by Wan Madzihi Wan Mahdzar and Bujang Ulis. Adenan Satem was the only candidate who lost the race to vice-president post. Adenan was later appointed to publicity chief while his brother Zainuddin Satem was appointed to the treasurer post. Leo Michael Toyad also secured a seat in the Supreme Council.

1987 political crisis

On 9 March 1987 (Monday), four Sarawak ministers and 3 assistant ministers suddenly resigned from the Sarawak cabinet. The four ministers were Noor Tahir (PBB), Hafsah Harun (PBB), Daniel Tajem (PBDS), and Edward Jeli (SNAP) and the three assistant ministers were Gramong Juna (PBDS), Michael Ben (SNAP), and Hollis Tini (SUPP).