Abdul Khalid bin Ibrahim is a Malaysian politician who served as the 14th Menteri Besar of the state of Selangor from 2008 to 2014. He was elected to the Selangor State Assembly and the Parliament of Malaysia in 2008 and 2013 as a member of the People's Justice Party, but became an independent in August 2014, coinciding with his resignation as Menteri Besar. He was sacked from the party for his refusal to vacate his Selangor Menteri Besar post.
In 2006, Khalid joined the opposition PKR, founded by the former deputy prime ministerAnwar Ibrahim, and became the party's treasurer-general. The party selected him as its candidate for a by-election for the Selangor State Legislative Assembly seat of Ijok, which he lost to K. Parthiban of the Malaysian Indian Congress, a component party of the ruling Barisan Nasional coalition. In the 2008 general election, he contested the federal parliamentary seat of Bandar Tun Razak and re-contested the Selangor State Assembly seat of Ijok. He won both seats, while the opposition Pakatan Rakyat coalition made unprecedented gains and took a majority in the Selangor State Assembly. Khalid was appointed as the Menteri Besar of Selangor and was sworn in on 13 March 2008. He was the first person not of the BN coalition to hold the post. In his first term, Khalid's government implemented a policy of delivering to each Selangor household an initial 20 cubic metres of water each year free of charge. The State Assembly also passed the country's first freedom of information legislation. It was in these areas—social policy and government transparency—that his administration was able to make the most progress. But in some cases, differences between the partners in the governing coalition, which included and the Pan-Malaysian Islamic Party ), proved difficult to reconcile. For example, in 2009 Khalid rejected a move by PAS to draft legislation banning the sale of alcohol in Muslim-majority neighbourhoods. In the 2013 general election, Khalid's Pakatan Rakyat coalition increased its majority in the Selangor State Assembly, winning 44 out of its 56 seats. Though Khalid's PKR won fewer seats than the DAP and PAS, he retained the position of Menteri Besar. In early 2014, PKR's national leader, Anwar Ibrahim, then a federal parliamentarian, sought to contest the Selangor State Assembly seat of Kajang in a by-election. The so-called "Kajang Move" would have allowed Anwar to oust Khalid as Menteri Besar with PKR's support. Anwar's conviction on a charge of sodomy caused Anwar's wife, Wan Azizah Wan Ismail, to take over Anwar's presidency of PKR and the nomination as PKR candidate in the by-election instead, which she won. In July, the party nominated Wan Azizah as its preferred Menteri Besar. The following month, Khalid was expelled from the party after he refused to comply with its direction for him to resign as the state's premier and make way for Wan Azizah. Khalid sacked the PKR and DAP members of Selangor's Cabinet-like Executive Council, and continued to administer the state as an independent assemblyman with the remaining four councillors from PAS. Khalid ultimately resigned on 26 August 2014, as it being clear that he could no longer command the confidence of the State Assembly. He remained in office while Sultan Sharafuddin deliberated on whom to appoint as his replacement, before settling on PKR's deputy president Azmin Ali, who was sworn in on 23 September 2014. After Azmin assumed office, the Sultan praised Khalid for leading the state "successfully and perfectly" and criticised the manner in which he had been ousted from the state's premiership by his own party.