Prior to be elevated as Senior Justice of the Supreme Court, he briefly tenured as the Chief Justice of the Sindh High Court from 1998 until refusing to take oath in opposition to martial law in 1999. He remained a strong critic of President Pervez Musharraf, eventually taking up a leading role in Lawyer's movement in 2007 to oppose President Musharraf. Ultimately, he unsuccessfully ran for the presidential elections held in 2007. Since 2011, he has been active in national politics through Pakistan Tehreek-e-Insaf (PTI), being the party's candidate for the presidential election 2013. He lost the election on 30 July 2013 to Mamnoon Hussain of Pakistan Muslim League (N).