Mahathir and the PH coalition have confirmed that, after a period of around 2 years, People's Justice Party (PKR) leader Anwar Ibrahim will take over as Prime Minister. On 11 June 2018, Mahathir said he's prepared to stay as Prime Minister for more than two years if that is what members of the public wants.[2]

According to the federal constitution, the Yang di-Pertuan Agong shall first appoint as Prime Minister to preside over the Cabinet and requires such Prime Minister to be a member of the Dewan Rakyat (House of Representatives) who in his judgment is likely to command the confidence of the majority of the members of that House and must not a Malaysian citizen by naturalisation or by registration. The Yang di-Pertuan Agong on the Prime Minister's advice shall appoint other Ministers from either Dewan Rakyat or Dewan Negara (Senate).

The Prime Minister and his cabinet ministers must take and subscribe in the presence of the Yang di-Pertuan Agong the oath of office and allegiance as well as the oath of secrecy before they can exercise the functions of office. The Cabinet shall be collectively responsible to Parliament of Malaysia. The members of the Cabinet shall not hold any office of profit and engage in any trade, business or profession that will cause conflict of interest. The Prime Minister's Department (sometimes referred to as the Prime Minister's Office) is the body and ministry in which the Prime Minister exercises its functions and powers.

If a government cannot get its appropriation (budget) legislation passed by the House of Representatives, or the house passes a vote of "no confidence" in the government, the Prime Minister is bound by convention to resign immediately. The Yang di-Pertuan Agong's choice of replacement prime minister will be dictated by the circumstances. Ministers other than the Prime Minister shall hold office during the pleasure of the Yang di-Pertuan Agong, unless the appointment of any Minister shall have been revoked by the Yang di-Pertuan Agong on the advice of the Prime Minister but any Minister may resign his office.

Following a resignation in other circumstances, defeated in an election or the death of a prime minister, the Yang di-Pertuan Agong will generally appoint as Prime Minister the person voted by the governing party as their new leader.

The power of the prime minister is subject to a number of limitations. Prime ministers removed as leader of his or her party, or whose government loses a vote of no confidence in the House of Representatives, must advise a new election of the lower house or resign the office. The defeat of a supply bill (one that concerns the spending of money) or unable to pass important policy-related legislation is seen to require the resignation of the government or dissolution of Parliament, much like a non-confidence vote, since a government that cannot spend money is hamstrung, also called loss of supply.

The prime minister's party will normally have a majority in the House of Representatives and party discipline is exceptionally strong in Malaysian politics, so passage of the government's legislation through the House of Representatives is mostly a formality.

Under the Constitution, the Prime Minister’s role includes advising the Yang di-Pertuan Agong on:

the appointment of the federal ministers (full members of cabinet);

the appointment of the federal deputy ministers, parliamentary secretaries (non-full members of cabinet);

the appointment of judges of the superior courts (which are the High Courts, the Court of Appeal and the Federal Court);

the appointment of the Attorney-General and the Auditor-General;

the appointment of the chairmen and members of the Judicial and Legal Service Commission, Election Commission, Police Force Commission, Education Service Commission, National Finance Council and Armed Forces Council; and

the appointment of the Governors of Malacca, Penang, Sabah and Sarawak.

Under Article 39 of the Constitution, executive authority is vested in the Yang di-Pertuan Agong. However, Article 40(1) states that in most cases, the Yang di-Pertuan Agong is bound to exercise his powers on the advice of the Cabinet or a minister acting under the Cabinet's general authority. Thus, most of the day-to-day work of governing is actually done by the Prime Minister and the Cabinet.

Under Article 55(3) of Constitution of Malaysia, the lower house of Parliament unless sooner dissolved by the Yang di-Pertuan Agong with his own discretion on the advice of the prime minister shall continue for five years from the date of its first meeting. Article 55(4) of the Constitution permits a delay of 60 days of general election to be held from the date of dissolution and Parliament shall be summoned to meet on a date not later than 120 days from the date of dissolution. Conventionally, between the dissolution of one Parliament and the convening of the next, the prime minister and the cabinet remain in office in a caretaker capacity.

From time to time prime ministers are required to leave the country on business and a deputy is appointed to take their place during that time. In the days before jet aeroplanes, such absences could be for extended periods.

Abdul Razak Hussein was the Acting Prime Minister after the first Prime Minister, Tunku Abdul Rahman stepped down as Prime Minister for three months in 1959 to strengthen his party, the Alliance for the 1959 federal elections after it had lost two states, Kelantan and Terengganu, in the State Elections which at that time were held before the Federal contest.

In 1988, when UMNO as the founding member of the Barisan Nasional coalition was declared unlawful and illegal political party, Mahathir Mohamad was disqualified as the Barisan Nasional chairman. Ling Liong Sik became the new Chairman of the Barisan Nasional and served as an Acting Prime Minister for a couple of days until the new party, UMNO Baru was legalised by the Registrar of Societies (ROS).

This is his second appointment as Prime Minister, 15 years after his retirement from politics. He was the fourth Prime Minister of Malaysia from 1981 to 2003 and referred as Father of Modernisation (Bapa Pemodenan). He is the only person to hold the position for two opposing political parties. He is the oldest Prime Minister to be elected at the age of 92.