Pakistan's former chief justice Nasir ul Mulk was named as the caretaker prime minister until general elections on July 25.
Mulk, who also served as the interim chief of the Election Commission of Pakistan, will head a technocratic government until elections as the current government and Parliament will be dissolved.
The announcement ends weeks of wrangling between Shahid Khaqan Abbasi's ruling Pakistan Muslim League-Nawaz (PML-N) and Opposition Leader Syed Khurshid Ahmed Shah's Pakistan People’s Party.
The outgoing government of Shahid Khaqan Abbasi is only the second to complete a five-year term in office, which underscores a democratic transition.
In its 70-year-long history, the country experienced its first democratic transition of power in 2013, when Pakistan Peoples Party handed over the power to Pakistan Muslim League-Nawaz (PML-N), which had won the general elections.