In 2011, the Green Party lost all six seats in Dáil Éireann. It meant it lost State funding and had to start from scratch.

In this year's general election it won 12 seats, which made it the fourth largest party.

And now, nearly five months on, it has become a coalition partner with Fianna Fáil and Fine Gael.

From zeros to heroes - how did the Greens do it?

The story of the party's track record in national politics began in 1989 when it won its first seat as Roger Garland was elected a TD on an environmental agenda.

The numbers doubled by 1997 with the election of Trevor Sargent and John Gormley, who would both go on to serve as leaders of the party.

By 2007, the Green Party had returned six TDs and went into coalition with Bertie Ahern's Fianna Fáil, a decision that ultimately led to the wipeout of the party's support.

The party was blamed at the ballot box in 2011 for being complicit in the financial collapse, which led to a bailout by the Troika.

John Gormley and Eamon Ryan

Gerard Howlin, a former advisor to Bertie Ahern, said Eamon Ryan and John Gormley, who had ministerial positions in that coalition, were 'stalwarts' of that government who "took extremely difficult decisions for a mess they had no role in making".

He said it has been the "longest, loneliest road back for Eamon Ryan" and that the party's comeback took a huge personal commitment from him.

It was at the party headquarters - a nondescript building on Suffolk Street - that the new leader paid the bills and quietly planned for the future.

Mr Howlin said it helped that Mr Ryan had been seen as a competent minister, but that it was really the growth of climate change and environmental issues in the public consciousness that was the rising tide for him to gain the successes he did.

In 2016, Eamon Ryan won back his seat back in Dublin Bay South, alongside his colleague Catherine Martin, who took the Green party's second seat in the 32nd Dáil for Dublin Rathdown.

Further success came last year, as the party rode the so-called 'Green Wave', the political revolution that saw numerous green candidates win electoral success across Europe.

The Green Party in Ireland gained 59 council seats, two MEPs and a third TD in the following by-election in November.

This was in the midst of the schools strike for climate, started by Swedish school girl Greta Thunberg. It was described as the largest global climate protest in history.

Thousands of pupils took to the streets of towns and cities around the country calling on the Government to commit to immediate and substantial climate action.

The environment dominated the national conversation as public awareness rose about plastics being recycled, food waste and sustainable energy.

Patrica McKenna, former Green Party MEP, said the party was bound to have success this year and that she hoped they have "learned their lesson from 2007" when it formed a coalition with Fianna Fáil.

At that time she warned the party not to go into government and said the Greens would be "wiped out" at the subsequent election.

Ms McKenna is more hopeful this time around.

She said: "At the moment they have a much stronger hand, they have double the seats and are working with two parties as opposed to one which should help."

With Eamon Ryan taking his party back from the brink, and back into government, he now faces a further battle – for his position as leader.

Deputy leader Catherine Martin is challenging him with the election taking place on 22 July.

So, after the weeks and days of negotiating and voting, there's more to do for the party.

Will Eamon Ryan be commended for his tenure with another stint? Or is it time for the first female leader to take over?

The next few weeks will be a historic period for the Green Party.