People were fed up with the HD Kumaraswamy government, BS Yeddyurappa said after Karnataka trust vote

Highlights BJP won 105 votes in floor test, Congress-JDS coalition got 99

The BJP tweeted it was end of an era of "corrupt and unholy alliance"

"People were fed up of this government," BS Yeddyurappa said

With smiles and victory signs, the BJP on Tuesday prepared to take power in Karnataka 14 months after it failed to rustle up the numbers to rule after the assembly election in which no party could win a majority.

BS Yeddyurappa, who had waited patiently for a trust vote for four days and said he was prepared to sit in the assembly till midnight, is set to be Chief Minister for the fourth time.

The BJP won 105 votes to the Congress-Janata Dal Secular's 99 in the trust vote that took place after a dragging debate that featured several speakers and was described as an attempt to stall a vote the coalition was certain to lose.

In the 225-member Karnataka Assembly, 20 were not present in the House for the floor test.

"It is a victory of democracy, it will be a new era of development," Mr Yeddyurappa said on the steps of the Vidhana Soudha or assembly building.

"People were fed up of this government," he said, adding that his government would focus on farmers.

The BJP tweeted that it was the "Game of Karma".

"It's the end of an era of corrupt and unholy alliance. We promise stable and able governance to the people of Karnataka. Together we will make Karnataka prosperous again," tweeted BJP Karnataka after its inevitable victory in the test of strength.

At 76, Mr Yeddyurappa is past the BJP's 75-year age cut-off for elected members, but an exemption has been made for the veteran warhorse of the party in Karnataka, a state where the BJP formed its first ever government in the south and which is seen as a beachhead for advancing into other states dominated by regional parties.

Mr Yeddyurappa's last term was just two-and-a-half days old. After being sworn in just after the Karnataka election in May last year, he failed to rack up majority support with the Congress and the JDS zealously guarding their lawmakers and ferrying them in and out of town to stymie attempts to lure them away.

The tables turned within a year. The Congress-JDS coalition struggled with infighting and accused the BJP of working meticulously to divide its ranks and draw away lawmakers as part of what was dubbed "operation kamala (lotus, BJP's symbol)".

Over the past two weeks, the Congress and outgoing Chief Minister HD Kumaraswamy's JDS watched helplessly as 16 lawmakers quit and two independent members pulled out support.

The rebel lawmakers flew to Mumbai and stationed themselves at a five-star hotel where even the Congress's chief troubleshooter DK Shivakumar was turned away.

The rebels refused to return and made it clear that this time, nothing would change their mind. The BJP firmly denied any role in the exodus.

Mr Yeddyurappa has been chief minister in 2007 and 2008, but could never complete a term.