He served in several cabinet positions in the BN administration under former Prime Ministers Abdullah Ahmad Badawi and Najib Razak from March 2008 to its 2018 general election loss, including Minister of Rural and Regional Development, Minister of Agriculture and Agro-based Industry, Minister of Domestic Trade, Cooperatives and Consumerism and Minister of Youth and Sports.[3] He was the 15th Leader of the Opposition in the Pakatan Harapan (PH) administration from March 2019 to its collapse in February 2020 amid the 2020 Malaysian political crisis. In the PN government, he was appointed Senior Minister in charge of Security from March 2020 to his promotion to the deputy premiership in July 2021, during which he was prominent in the country's response to the COVID-19 pandemic. He led a faction of his party (UMNO) that continued supporting Prime Minister Muhyiddin Yassin in June 2021, when the party withdrew its support over the government's handling of the pandemic.