A cold and miserable night in April 2007, just weeks away from the General Election.

The Fine Gael party faithful packed into the Mullingar Park Hotel for a rally with Enda Kenny. This was their time, he told the cheering rank and file members, the foot soldiers for the campaign ahead.

Fianna Fáil was in difficulty as then taoiseach Bertie Ahern was facing increasing questioning inside and outside the Mahon Tribunal on his personal finances.

"Carp diem," Kenny told party members - seize the moment.

Elected party leader in 2002 after a nightmare election reduced Fine Gael to just 31 Dáil seats, this was his first big test. The party longed to return to power.

Although he won the leadership – it was his second attempt – many doubted his capacity to drag the party back to the front line of political life.

Kenny was in for the long haul. His was first elected to the Dáil in 1975 in the Mayo West by-election brought about by the death of his father, Henry Kenny.

A mere 24 years old, he was then the youngest member of the Dáil. And now 32 years later, the party’s hopes rested on his shoulders.

After the rally, Kenny reflected on what he believed was needed to lead Fine Gael.

"I’ve always said to be a successful leader of Fine Gael you would want to have the reputation of Michael Collins and the personality of Muhammad Ali," he remarked. And he said it with a straight face.

Whatever about the qualities of those two icons, Kenny had no shortage of stamina and resilience.

He rarely entertained doubts about his own determination or guile to climb to top of the party. But getting to the Taoiseach’s office was the ultimate challenge.

In a bid to maximise that prospect Kenny and then Labour Party leader, Pat Rabbitte and party colleagues agreed the "Mullingar Accord" in September 2004. It was a pact aimed at presenting a united and alternative government to the electorate.

For all Fianna Fáil’s woes entering the 2007 General Election – including a surreal opening campaign launch and then Taoiseach and party leader Bertie Ahern missing for several days – the party came good for a third successive term.

For Fine Gael opposition beckoned again. This time, however, not getting into government proved a bitter-sweet outcome.

Within two years the global financial cash was hitting and Ireland’s lob-sided economy, with its massive exposure to property loans and critical dependence on cyclical property tax revenue, was brutally exposed.

Yet, in early 2010 as the crisis took hold, the political gains were going the way of the Labour Party and its new leader Eamon Gilmore.

When Labour surged ahead of Fine Gael that summer panic set in.

Kenny’s detractors mounted a ham-fisted attempt to oust him but he routed them in a leadership challenge.

He tightened his grip on the party, brought some of the rebels back to his front bench and appointed former leader Michael Noonan as finance spokesman.

The party’s fortunes began to change.

By the year end Fianna Fáil was on the ropes as the economy tanked and the government had to accept an IMF/EU €67bn bailout.

In the election that followed in early 2011 the electorate punished Fianna Fáil with a vengeance.

Fine Gael came close to winning an unthinkable overall majority. The outcome, though, was still the party’s best electoral result.

Enda Kenny with his seal of office with former president of Ireland Mary McAleese in March 2011

A coalition with Labour followed giving the new government the biggest majority in the history of the State.

Government, however, was a grind of harsh economic measures dictated by the IMF/EU bailout team who had taken up residence in the Department of Finance.

Savage spending cuts, increased taxes and not one, not two but several botched attempts to introduced water charges fuelled deepening public anger and hostility.

Kenny’s experience and standing in the EU did help with negotiations to ease some of the harsh conditions.

But the government also benefitted from deals done with Greece and the more benign approach adopted by Mario Draghi when he took over the ECB.

Relations within the coalition were also strained and at times Labour felt that the Taoiseach's inner circle were repeatedly presenting Kenny as the front of house figure whenever there was good news, leaving them to take the hits for the unpopular decisions.

It almost came to a head at one of the most significant moments of that government. By December 2013 Ireland was ready – far sooner than most expected – to exit the bailout.

Labour’s Gilmore was excluded from Kenny’s plan to deliver a national television address.

It showed how the Taoiseach operated. Kenny’s inner team constantly worked to protect him – when trouble arose on issues like health, water charges and the toxic revelations concerning An Garda Síochána they made sure their man was kept at one remove.

His handling of the circumstances leading to the departure of Garda Commissioner Martin Callinan and the resignation of Justice Minister Alan Shatter were chaotic and inept to say the least. Kenny still survived, when others fell.

Seen by many as a lightweight, Kenny always thrived on the extent to which those inside and outside the party were ready to underestimate his capacity for ruthless political decisions.

Yet it was the Catholic, west of Ireland conservative who became the first Taoiseach to roundly attack the Church and Vatican after the Cloyne report into clerical child abuse.

He was the Taoiseach who issued a formal apology to the victims of the Magdalene laundries.

He was resolute in standing by legislation for the X Case even at the expense of resignations from his own party. And he campaigned strongly for the marriage equality referendum.

Even though these were mainly Labour Party policy issues they would never have made it over the line without Kenny’s ability to carry Fine Gael and its support base.

His biggest problem has always been his unnerving ability to bring trouble on his own head by loose talk and playing fast with facts.

For instance, in Madrid in October 2015 he told a gathering that the Governor of the Central Bank had warned him at one stage the government would have to put the army around banks and ATMs because of the financial crisis.

The same loose talk caused trouble in the 2016 General Election campaign when he told a rally he was fed up with "whingers" complaining that nothing good was happening in the country. Even though he claimed it was directed at Fianna Fáil members in this home town of Castlebar, the damage was done.

Fine Gael went into the election with a campaign theme "Keep the Recovery Going". But many, many people were wondering: "What recovery?"

Sure, things had improved but thousands were suffering from legacy debts, job losses, worsening waiting lists in hospitals, a growing housing and homeless crisis.

For a coalition with the biggest majority in the history of the State, it might have been expected that Fine Gael and Labour – even with some losses – would be positioned to form a new government, perhaps with additional support. It was not meant to be.

On 3 February 2016, the Taoiseach dissolved the Dáil for a general election.

From the moment he walked down the steps of Government Buildings it looked ominous.

The tánaiste and then Labour leader Joan Burton looked lost and forlorn as Kenny brusquely departed leaving her standing on the steps alone.

Labour was decimated and Fine Gael reduced from 76 to 50 seats. It looked over.

Kenny once again played the long game. He knew forming a government was going to be tough for any combination of parties. Nonetheless, Fine Gael was still best placed with numbers.

This was the kind of post-election result that should have finished his career.

Sensing the potential danger, he bought time before appointing the most likely challengers as negotiators to explore the options for a new administration.

Having campaigned on explicit assurances that Fine Gael would not, in any circumstances, enter coalition with Fianna Fáil he had no difficulty executing a massive U-turn.

He offered a grand coalition to Fianna Fáil in a bid to secure a stable government headed by himself.

His solemn promises were pushed aside readily – only to be rebuffed by Fianna Fáil. But he did not give up. Independents were sought out.

On 6 May, 70 days after the election, he became the first Fine Gael leader to be returned to office as Taoiseach for a second successive term. Yet again, he had defied the odds and his critics.

He was leading the first minority Government of its kind in the history of the State – a Government whose survival would ultimately depend on a "Confidence and Supply" deal with Fianna Fáil from the Opposition benches.

His second term has been dominated by Brexit and the emergence of new disclosures about the Garda; especially new disclosures concerning whistle blower Sgt Maurice McCabe.

Last February RTÉ’s Prime Time revealed Sgt McCabe had been subject to unfounded allegations of child abuse. The ensuing crisis ended up in yet another inquiry, this time a full tribunal to investigate claims that Sgt McCabe was subject to an organised smear campaign by garda management.

But it was Kenny’s handling of this that proved fatal.

In an interview on RTÉ’s This Week, he said Minister for Children Katherine Zappone had told him of a meeting with Sgt McCabe but he was not aware of the details.

When she contradicted this account, he apologised and corrected the record. It was too little, too late.

Once again loose talk and playing fast with details was to cost him dearly.

The party could no longer live with the risk of him as leader when election could happen at any time. He could no longer ignore the clamour of calls to stand down.

He promised to deal with the leadership on his return from the St Patrick’s Day trip to Washington. Unsurprisingly, he managed to push the deadline out.

The party would have to wait until the Brexit ground rules were agreed by the EU at the end of April. Still, he was always living borrowed time.

As he steps down as party leader there are still major problems in health, housing, homelessness and the Garda to name a few.

That said, Ireland’s overall economic status has improved. Ireland moved from basket case to the fastest growing economy in the EU.

The national finances have stabilised, the country can borrow at cheap rates again and few would have believed in the dark days of 2011 that by 2017 the country would be close to full employment.

Like most leaders his legacy will be mixed.

He brought Fine Gael to its best election result, its first back-to-back spell in Government and instilled a sense of purpose.

He leaves a party that is heading a government that merely exists from week to week; a Government whose survival means many key issues are postponed and kicked down the road into reviews, committees, etc.

One thing is certain – it will be a long time, if ever, before another Fine Gael leader equals his record as longest serving leader and Taoiseach.