Chaturvedi invited Kumaraswamy to form the government in the state after the resignation of the Congress Government led by Dharam Singh. He was Chief Minister of Karnataka from 4 February 2006 to 9 October 2007. On 27 September 2007, Kumaraswamy said that he would leave office on 3 October as part of a power-sharing agreement between the Janata Dal (Secular) and the Bharatiya Janata Party (BJP), despite the calls of some legislators in the JD(S) for him to remain in office for the time being, due to complications in arranging the transfer of power. However, on 4 October 2007, he refused to transfer power to the BJP. Finally, on 8 October 2007, he tendered his resignation to Governor Rameshwar Thakur, and the state was put under President's rule two days later. However, he reconciled later and decided to offer support to the BJP. BJP's B. S. Yeddyurappa was sworn in as the Chief Minister of Karnataka on 12 November 2007. But, again refused to support BJP government over a disagreement on sharing of ministries which resulted in Yeddyurappa resignation as Chief Minister on 19 November 2007. After the untimely demise of Karnataka state JD(S) President Merajuddin Patel, he was elected unopposed as President of the state unit. However, after the by-election results of Bangalore Rural Lok Sabha constituency and Mandya in which his party candidates lost, he resigned from the post of President of the Janata Dal (Secular) State unit, and as leader of the opposition. However, party cadres succeeded in convincing him not to quit as leader of opposition in the Karnataka Assembly. In September 2013, A. Krishnappa was selected as Janata Dal-Secular's president for Karnataka, filling the vacancy left by Kumaraswamy. In November 2014 Kumaraswamy was elected as Karnataka state Janata Dal (Secular) President. Kumaraswamy is also known for accusing political rivals of corruption. In 2018 elections in Karnataka state, JD(S) was the third-largest party but after a post-poll alliance with the Rahul Gandhi led Indian National Congress, he was sworn in as the Chief Minister on 23 May 2018. In the 2019 parliament elections, his son Nikhil Gowda contested in the Mandya (Lok Sabha constituency) against an independent candidate Sumalatha, wife of film actor Late Ambareesh. Kumaraswamy took this contest as a prestige and campaigned all across the constituency. In vain his son lost the election by a margin of 1,30,000 odd votes. This was a major