Following the military takeover, Hamid defected to the PML(N)'s splinter group led by Shuja'at Hussain, and successfully participated for NA-114 constituency during the general elections held nationwide in 2002. From 2004 to 2007, he tenured as Minister of State for Defence, Investment and Privatization; in 2008, he had been elevated as the Minister for Law.&lt;ref name="dawn/28nov2017"&gt;&lt;/ref&gt;