Sinn Féin has said it will oppose any deal between British Prime Minister Theresa May and the Democratic Unionist Party in Northern Ireland that undermines the Good Friday Agreement.

Speaking following a meeting with Mrs May at 10 Downing Street, Sinn Féin leader Gerry Adams said: "We have just finished a meeting with the British prime minister and her secretary of state and we told her very directly that she was in breach of the Good Friday agreement".

Mrs May is looking for support from the Democratic Unionist Party after failing to win a majority for her Conservative Party in last week's elections.

All five Northern Ireland parties had separate meetings with Mrs May at 10 Downing Street this afternoon amid warnings an expected deal with the DUP to prop up her minority government could undermine the peace process.

SDLP leader Colum Eastwood said Mrs May had not convinced him the "DUP tail is not wagging the Tory dog".

He said: "We were very clear that it can't be a deal that gives the DUP power over the Tory Party. It can't be a deal that affects and infects the talks process."

Alliance leader Naomi Long struck a more optimistic note as she left Downing Street.

"We remain optimistic that a deal [on power-sharing] can be done if others have the will to do so," she said.

Ulster Unionists leader Robin Swann, meanwhile, argued that appointing an independent chair to take over the faltering Stormont talks process would be a waste of time.

He rejected the move proposed by Sinn Féin, the SDLP and Alliance as he emerged from a meeting with the Prime Minister at Downing Street.

The three parties claim the UK government's role as a facilitator in negotiations to re-establish the crisis-hit institutions has been fatally undermined by the mooted parliamentary deal with the DUP.

They have demanded that Northern Ireland Secretary of State James Brokenshire step aside from chairing any part of the talks.

The head of the Northern Ireland Civil Service, Malcolm McKibbin, has already taken on responsibility for moderating many of the exchanges, with Sinn Féin and the SDLP having already questioned the impartiality of Mr Brokenshire earlier in the process.

Mr Swann said talk of replacing Mr Brokenshire or appointing an independent chair from outside the UK and Ireland was a "sideshow".

"We have two weeks from today to get the Northern Ireland executive up and functioning again and to try to bring in a new chair is actually a waste of time and a distraction," he said.

"The Ulster Unionist Party is prepared, as we have always been prepared, to get the executive up and functioning again."

Northern Ireland has been without a power-sharing Executive since March and without a first and deputy first minister since January.

The institutions collapsed amid a bitter row between the DUP and Sinn Féin about a botched green energy scheme.

The British government has warned that direct rule from London could be reimposed if the local parties fail to reach an agreement before a 29 June deadline.

In a statement following the meetings, Mrs May said that she met the five main Northern Ireland parties "with a clear focus on restoring devolved Government to Northern Ireland as soon as possible".

She warned that time was running short and that the parties "must come together by the 29 June for the return of a strong voice at Stormont".

She said: "My Government remains absolutely committed to doing everything we can to help take this process to a successful conclusion, remaining steadfast to our commitments in the Belfast Agreement and its successors."

Conservatives accused of 'putting party before peace'

Former Northern Ireland secretary Peter Hain has accused the Conservatives of "putting party before peace" by seeking an agreement with the DUP.

Mr Hain, who was Northern Ireland secretary from 2005 to 2007, warned that the situation is "very damaging". 

He told the Press Association the British government could not act as a "neutral facilitator" in Northern Ireland, as the Good Friday Agreement envisages, if it was dependent on one of the Northern Irish parties for its majority in the House of Commons.

"I cannot see for the life of me how you can be a neutral facilitator in bringing the parties together, at a very dangerous time for Northern Ireland politics to get self-government and the legislative assembly back up and running, when your prime ministerial life and your Government's life depends on one of the most influential parties - the biggest party - in Northern Ireland," he said.

"I just don't see how that works. I think it's a very damaging situation."

He added: "It corrodes confidence in the negotiating process.

"I think it's very self-interested, putting party before peace in Northern Ireland - party interest before peace and stability in Northern Ireland - and I do think it's that serious."