Sinn Féin leader Gerry Adams, speaking after his party’s annual convention told RTE's "The Week in Politics" program that his party was willing to talk to Fine Gael and Fianna Fáil about forming a coalition government with either of them, but if there was agreement on a common program but it would have to be approved by a special conference of Sinn Féin.

"If in the course of all of that, although it would be very, very challenging, we came up with a program for government which did the business as far as we were concerned, our leadership would consider that and, yes, if we thought that was an advance ... of course we would have to consider bringing it back to an ardfheis," the Sinn Féin leader said

Earlier in his leadership address he had slammed Fianna Fail.

The Fianna Fáil party has come under attack from Sinn Féin leader Gerry Adams for its performance since the Irish general election held two months ago.

Speaking at the Sinn Féin ardfheis (annual conference, pronounced 'ardesh') in Dublin at the weekend Adams recalled that Fianna Fáil leader Micheál Martin had stated that he would not keep Enda Kenny in office as head of a Fine Gael-led government.

But Adams pointed out that Fianna Fáil was currently in talks with Fine Gael about the terms under which a minority government led by Kenny could take power, while Fianna Fáil remained in opposition.

If an agreement can be reached, Fianna Fáil will abstain in the parliamentary vote for Taoiseach or head of government, thereby allowing the Fine Gael leader to be elected, provided he can get the support of a sufficient number of independent TDs.

The Sinn Féin leader recalled that, during the election, Martin had delivered "nasty little soundbites" in which he claimed that Sinn Féin was unfit for government. Adams said that putting Fine Gael back into power was not in the national interest. He went on:

"Fianna Fáil voters did not vote to give Fine Gael another term. And Micheál Martin knows full well that Enda Kenny will not resolve the homelessness crisis, the health crisis or the crisis in living which many families are enduring.

"He knows the Fine Gael leadership has little interest in Irish unity. But he would prefer to put them back as part of his effort to counter the growth of Sinn Féin."

Highlighting the controversial issue of water charges, introduced by the outgoing government for homes using the public water supply, Adams pointed out that the Fianna Fáil manifesto pledged to abolish the charges as well as Irish Water, the company that manages the scheme.

"So, Micheál, water charges must go and Irish Water must go," the Sinn Féin leader said.

The Fianna Fáil-Fine Gael talks are set to resume today [Monday] amid reports that parties are preparing for another general election in the near future if the negotiations collapse. Water charges are said to be the key issue in the talks.

Adams also criticized TDs who were elected to Dáil Éireann as independents and have since been involved in talks about supporting a government led by either Fine Gael or Fianna Fáil. He said:

"There were other citizens who thought they were voting for an alternative when they voted independent. Some of these TDs now stand with Fianna Fáil and Fine Gael. How independent is that?"

The Sinn leader said his party would campaign for a repeal of the eighth amendment to the southern constitution which critics and activists say is unduly restrictive of abortion.

Looking ahead to the next month's elections to the Stormont Assembly in the North, Adams pointed out that they were taking place on the anniversary of the death of republican hunger-striker Bobby Sands on May 5th, 1981. He said:

"Remember last September, Enda Kenny and Micheál Martin called for the suspension or the adjournment of the political institutions of the Good Friday Agreement. But Sinn Féin and others refused to accept this. We successfully negotiated the Fresh Start Agreement.

"And I want to commend the huge commitment and leadership of my friend and comrade Martin McGuinness in building the peace. Sinn Féin have stood against the British Tory austerity policies.

"We have stopped the introduction of water charges [in the north]. We have guaranteed free hospital care, free GP care and free prescriptions. However, this is not enough.

"Marriage equality is still banned in the north. And we are committed to changing that."

Commenting on the June 23rd referendum on UK membership of the European Union, he reiterated his party's opposition to a British exit – generally known as "Brexit" – which has given rise to reports that border controls may be re-established between the two parts of the island of Ireland.

"While Sinn Féin believes in a different European Union – a social EU based on citizens’ rights and equality – we will be campaigning for a strong vote against Brexit.

"The imposition of border controls and economic barriers are not in the interests of the people of this island. Our clear goal is to break them down and end partition."

On the issue of a United Ireland, Adams called for an end to "partitionist thinking" by policy-makers in the south and the news media, and he continued:

"Now of course, from a republican and democratic perspective the British government has no right to be in any part of Ireland.

"But from a unionist perspective all has changed, changed utterly from the days of a one-party state where nationalists were excluded from power; denied equality in housing, employment and voting rights; and where expressions of Irish national identity were criminalized.

"Now there's a peaceful and democratic route to Irish unity," the Sinn Féin leader said.

The auditorium in the Convention Centre on Dublin's docks was filled to capacity for the speech and journalists had difficulty gaining access to it. The weekend on which the ardfheis took place was exactly 100 years since the Easter Rising of 1916.

The same auditorium, which holds about 2,500 people, was used for a concert staged in honor of Britain's Queen Elizabeth II during her state visit to Ireland in 2011.

Adams was re-elected as party president at the weekend, an office he has held since 1983. Despite growing speculation that Adams will step down, this is considered unlikely to happen in the near future.

The general tone of the ardfheis was low-key and, although Sinn Féin's rise from 14 to 23 Dáil seats in the general election was less than polls had indicated beforehand, there was a mood of cautious optimism among delegates that the party will play a key opposition role in the coming parliamentary session.

British Ambassador to Ireland, Dominick Chilcott, was among the attendance for the ardfheis speech by Gerry Adams.

Sinn Fein President Gerry Adams .Photocall Ireland