Sinn Fein's Gerry Adams today claimed the £1billion deal for the DUP to prop up Theresa May in No 10 threatens the Good Friday Agreement.

The Tories finally signed an agreement for the party founded by Ian Paisley to prop up Mrs May's minority government this morning.

In return for 10 DUP votes on crucial legislation - including on Brexit - Westminster will pour an extra £1billion into the coffers of Northern Ireland's devolved executive.

But it has emerged the Tories will keep control of the cash from London if talks to broker a new power-sharing deal in Belfast fail this week.

On a chaotic afternoon, Tory sources first said the money would not be transferred at all if power-sharing is not restored, then said it would be controlled by a Tory-DUP committee if no executive is formed in Belfast.

It was later clarified the money would be controlled via the Northern Ireland Office or the Treasury if direct rule is re-imposed for the first time in a decade.

A deadline is looming on Thursday for the DUP and Sinn Fein to agree a deal or face the return of direct rule from London.

Sinn Fein have for months refused to re-join an executive headed by DUP leader Arlene Foster amid her involvement in a public spending scandal.

But the republican party refuses to take its seats in Westminster meaning it would be frozen out of the money if Northern Ireland is ruled from London.

Tory sources insisted Mrs May wanted the £1billion to be spent by a restored Northern Ireland Executive and insisted the deal was not a 'transaction' with the DUP.

Gerry Adams (pictured in Stormont last week) today claimed the £1billion deal for the DUP to prop up Theresa May in No 10 threatens the Good Friday Agreement

The Tory and DUP chief whips signed the deal in Downing Street today as Theresa May and Arlene Foster looked on. Pictured left to right, DUP deputy leader Nigel Dodds, Mrs Foster, DUP chief whip Jeffrey Donaldson, Tory chief whip Gavin Williamson, Mrs May, First Secretary of State Damian Green

Sinn Fein collapsed the executive earlier this year after demanding Mrs Foster resign over her role in a renewable energy scandal.

Mrs Foster will now enter talks with Sinn Fein warning the republican party will only be able to help spend the new cash from Westminster if it agrees to her staying on.

Sinn Fein president Gerry Adams said: 'The price of today's DUP-Tory deal is DUP support for continued Tory Austerity and cuts to public services.

'It provides a blank cheque for a Tory Brexit which threatens the Good Friday Agreement.'

Mr Adams signalled Sinn Fein could eventually support the deal but warned 'the devil is in the detail'.

Labour leader Jeremy Corbyn today condemned the deal as a stitch up to help Mrs May 'cling to power'.

Nicola Sturgeon, the SNP first minister in Scotland, said the 'grubby' agreement was unfair to Scots.

Senior Conservative sources today denied the deal was about handing money to the DUP, insisting the money was for Northern Ireland.

The source said: 'Both the Conservative Party and the DUP are committed to getting the Executive re-established because we both believe that decisions about funding for different public services in Northern Ireland should be taken by politicians in Northern Ireland.

'We want the additional funding identified in this agreement to go to a new Executive.

'However, if despite our collective efforts it proves impossible to re-establish the Executive, the Conservative Party, in signing this agreement, has recognised the case for the higher funding Northern Ireland needs.'

After more than two weeks of intense wrangling, the Tories and the Northern Ireland party put the stamp on a deal that shores up the PM's majority in the Commons

Mr Adams is likely to have to accept Mrs Foster continuing as First Minister if powersharing is to be restored - something Sinn Fein have shown no sign of doing since the executive collapsed and forced new elections in the spring.

THE COST OF POWER: WHAT IS IN THE TORY-DUP DEAL Overall an extra £1billion of funding will be ploughed into Northern Ireland's schools, NHS and infrastructure over the next two years.

of funding will be ploughed into Northern Ireland's schools, NHS and infrastructure over the next two years. This includes £200million in each of the next two years on infrastructure projects, including the York Street Interchange. It also includes £75million in each of the next two years for ultra fast broadband.

in each of the next two years on infrastructure projects, including the York Street Interchange. It also includes in each of the next two years for ultra fast broadband. Another £20million a year for five years will be spent to alleviate poverty in poor areas of the province.

a year for five years will be spent to alleviate poverty in poor areas of the province. Health and education services will be handed an extra £50million in each of the next two years to tackle 'immediate pressures'.

in each of the next two years to tackle 'immediate pressures'. The NHS in Northern Ireland will also be reformed via £100million in each of the next two years.

in each of the next two years. Tory manifesto plans to scrap the triple lock for the state pension and curb winter fuel payments to wealthy pensioners are abandoned.

Commitment to keep defence spending at 2 per cent of GDP, and extending the armed forces covenant to Northern Ireland.

Promise to secure a Brexit that benefits the whole of the United Kingdom. Advertisement

The new arrangement dramatically boosts Mrs May's chances of clinging on as PM after the disastrous election that stripped her of her overall Commons majority.

But it has come at a significant price - with around £1billion of extra funding on schools, hospitals and infrastructure for the province over the next two years.

The DUP is also claiming credit for the Tories ditching two key manifesto pledges - which would have seen the end of the triple lock on pensions and curbs to winter fuel payments for pensioners.

Tory sources denied the deal was a 'transaction' with the DUP but admitted the money would still be steered by the party from Westminster if power sharing is not restored at Stormont.

The deal will run until the next election - and be reviewed at the start of every parliamentary session.

Labour leader Jeremy Corbyn condemned the deal as a stitch up to help Mrs May 'cling to power'.

Nicola Sturgeon said it was 'grubby' and 'unfair' on Scotland.

The Tories have scrambling to secure a 'confidence and supply' arrangement since voters dealt Mrs May a bloody nose on June 8.

The smaller party will remain outside Government but ensure the Tories stay in office by supporting them on financial measures and no-confidence votes.

It means that Mrs May now has an effective majority of 13 in the House of Commons, once the 10 DUP MPs are added to the 317 Tories.

After initial signs of progress, the Conservatives were embarrassingly forced to row back on an announcement that agreement had been reached.

Talks dragged on for more than a fortnight before finally reaching a conclusion this morning.

A beaming Mrs Foster spoke to journalists in Downing Street after the signing, flanked by deputy Mr Dodds (pcitured left) and Mr Donaldson

After talks around the Cabinet table this morning (pictured), the Prime Minister said the DUP and the Tories 'share many values' and the agreement was 'a very good one'

Mrs May and DUP leader Arlene Foster smiled as their respective chief whips, Gavin Williamson and Jeffrey Donaldson, signed the document in No10 this morning.

Mrs Foster said she was 'delighted' an arrangement had been agreed.

The Prime Minister said the DUP and the Tories 'share many values' and the agreement was 'a very good one'.

HOW THE TORY-DUP DEAL HAPPENED June 8: The general election takes place and Theresa May fails to win the majority she expected. June 9: May goes to see the Queen to say she can form a minority Government. On her return to No 10, the PM says she will ask the DUP for help. June 10: No 10 appears to announce it has struck an 'outline agreement' with the DUP. The DUP deny a deal is done and new talks are convened within hours. June 12: Chief Whip Gavin Williamson flies to Belfast to hold talks with the DUP. It emerges the Queen's Speech may have to be delayed while talks continue. June 13: DUP leader Arlene Foster visits No 10 for face to face talks with May. June 14: The devastating Grenfell Tower fire halts all political talks as the Government struggles to respond to the crisis. June 21: The Queen's Speech finally takes place, two days later than planned and without any agree deal in place. Reports emerge the DUP's price for a deal is £2billion. June 26: Foster returns to No 10 to sign a deal, which she announces in Downing Street. May issues a written statement without going in front of the cameras. Advertisement

Speaking in No 10, Mrs May said that parties 'share many values in terms of wanting to see prosperity across the UK, the value of the union, the important bond between the different parts of the United Kingdom'.

'The agreement we have come to is a very, very good one, and look forward to working with you,' she told the DUP politicians.

Speaking in Downing Street after signing the deal, Mrs Foster said the agreement would deliver 'stable government in the UK's national interest at this vital time'.

The DUP leader said she had secured a £1billion investment for the province over two years plus new flexibility on £500million already committed.

That is equivalent to an increase of around 4 per cent on the current annual budget for Northern Ireland.

The Tories have given up manifesto pledges to axe the triple lock on pensions and cut winter fuel allowance payments to wealthy pensioners.

The Armed Forces covenant will be extended to Northern Ireland and the two parties have recommitted to spending 2 per cent of GDP on defence.

Mrs Foster said: 'Throughout these discussions our guiding principle has been our commitment to acting in the national interest, in accordance with our shared objective of strengthening and enhancing our precious union.

'In concluding this agreement, we have done so to secure our nation, building the prosperity of all and supporting our exit from the European Union to benefit all parts of the United Kingdom.'

She added: 'Our aim in this negotiation has been to deliver for all of the people of Northern Ireland

'The measures we are announcing will be to benefit all of our people.

'They will boost the economy, invest in new infrastructure as well as investing in the future of our health and education sectors and a range of other measures.'

CASH FOR ROADS, SCHOOLS AND HEALTH... AND THEY'LL BACK BREXIT IN RETURN Analysis by Jason Groves for the Daily Mail - Under the 'confidence and supply' arrangement, the DUP's ten MPs will vote with the Government not just on the Queen's Speech and the Budget, but also on security policy and, crucially, all aspects of Brexit. - They will also back Theresa May on all confidence motions, meaning it is far less likely that her Government will fall. The Conservatives' 318 MPs and the ten DUP MPs make 328 – more than half of the 650 MPs in the House of Commons. - In reality, the support of the DUP will give the Prime Minister an effective working majority of 13, given that Sinn Fein does not take up its seven seats, while Speaker John Bercow and his three deputies – two of whom are Labour MPs – do not take part in votes. - The DUP will get £1billion in additional funding over two years – equal to a 5 per cent rise in the province's budget – with the option to come back for more. - The deal breaks down as £400million for infrastructure, including a new motorway interchange; £150million to provide 'ultra-fast' broadband; £300million for health and education; £100million to tackle deprivation; and £50million to be spent on mental health. - Conservative pledges to scrap the triple lock on pensions and means-test the winter fuel allowance will not go ahead. But both of these measures were already heading for the dustbin in the wake of the general election. - Defence spending will continue to meet Nato's 2 per cent target and cash support for farmers will remain at current levels until the next election. - The open-ended nature of the deal could see the DUP coming back for more money in the next few years – or even holding the Government to ransom over key votes. - Cuts to air passenger duty at Ulster's airports and special corporation tax status could also be demanded. - Some Tories also fear the alliance with the DUP could prove 'toxic' because of the party's deeply conservative stance on issues such as gay rights and abortion. However, these do not come under the deal as powers are devolved to the Northern Ireland Assembly. Advertisement

The signing was attended by First Secretary of State Damian Green (pictured left), Mrs May, and chief whip Gavin Williamson for the Tories

Mr Dodds, Mrs Foster and Mr Donaldson (pictured left to right) were present for the DUP

Mrs Foster said agreement would be subject to review between the parties before every new parliamentary session.

The DUP leader said she would return to the province this afternoon to resume talks with Sinn Fein on getting power sharing in Belfast back up and running.

Demands for significant increases in funding for Northern Ireland were among the main sticking points in the talks.

WHAT IS CONFIDENCE AND SUPPLY? In a hung parliament, no party can command a majority in the Commons alone. But the Tories' 'confidence and supply' deal with the DUP means that the Northern Ireland party will prop them up in key votes. When governments cannot pass financial packages or a Queen's Speech they usually have to resign. But the DUP has committed to vote with them when such issues arise, hugely enhancing the chances of Theresa May's administration surviving in power. Advertisement

There was speculation the DUP were asking for around £2billion extra.

Despite the hard bargaining, the DUP was always likely to support Mrs May, not least because they are strongly opposed to Jeremy Corbyn due to his links to the IRA.

Some Tories - including ex-PM John Major and former Cabinet minister Lord Patten - have been alarmed that an arrangement with Ian Paisley's former party could damage the UK government's claim to be impartial in the Northern Ireland talks.

The province has been in crisis since Sinn Fein pulled out of government in January, prompting an election in March and a series of missed deadlines to restore power-sharing.

Mrs May renewed her appeal today for the parties in the province to resume power sharing.

'Time is running short for the parties to come together and reach agreement to re-establish a power-sharing Executive by 29 June. I hope the parties will look beyond their differences and come together with a shared sense of common purpose to serve all communities in the best interests of Northern Ireland. Northern Ireland needs a functioning devolved government at this important time,' she said.

'Her Majesty's Government will continue to do everything we can to work with the parties in Northern Ireland, alongside the Irish Government, to bring back a strong voice at Stormont for a positive future for everyone in Northern Ireland.'

But Labour leader Mr Corbyn said: 'Austerity has failed. Cuts to vital public services must be halted right across the UK, not just in Northern Ireland.

'The government must immediately answer two questions. Where is the money for the Tory-DUP deal coming from? And, will all parts of the UK receive the much needed additional funding that Northern Ireland will get as part of the deal?

'This Tory-DUP deal is clearly not in the national interest but in May's party's interest to help her cling to power.'

Miss Sturgeon said: 'Any sense of fairness sacrificed on the altar of grubby DUP deal to let PM cling to power, & Scots Tories influence in No10 shown to be zero.'

Welsh First Minister Carwen Jones said the agreement was 'outrageous'.

The Labour politician said: 'Today's deal represents a straight bung to keep a weak prime minister and a faltering government in office.

'It is outrageous that the prime minister believes she can secure her own political future by throwing money at Northern Ireland whilst completely ignoring the rest of the UK.'

Nicola Sturgeon (pictured in Edinburgh today), the SNP first minister in Scotland, said the 'grubby' agreement was unfair to Scots.

There are also concerns that the DUP's stance on issues like gay rights could be toxic for the Conservative brand.

Lord Patten suggested yesterday that 'every vote' from the DUP would cost the country money and suggested voters in the other parts of the UK would be angry that Ulster was getting special treatment.

The peer told ITV's Peston on Sunday: 'The DUP is a toxic brand and the Conservative Party has got itself back into the situation where there's a danger of it looking like the 'nasty party' to borrow from Theresa May.'

Mrs May told Tory conference in 2002 that 'some people call us the nasty party' and warned of the need for an image overhaul.

Details of the agreement between the two parties will be 'totally transparent', Mrs Foster insisted before it was sealed in No 10.

'I think that this agreement will bring the prospects of doing a deal at Stormont closer because this will have a positive impact in relation to Northern Ireland,' Mrs Foster said.

She voiced hopes that a second deal on power sharing in the province could be reached this week too.

Scottish First Minister Nicola Sturgeon said it was a 'grubby' deal and 'unfair' on Scotland

Former minister Grant Shapps jibed that the Tories would have won an overall majority if its current policies had been in the manifesto

The agreement was finally sealed in Downing Street after more than a fortnight of behind the scenes wrangling

The Prime Minister welcomed Mrs Foster to No10 earlier with a warm handshake

Mrs Foster, her deputy Nigel Dodds (left) and chief whip Jeffrey Donaldson (right) posed for photographs with Mrs May outside No10 before the signing

The Prime Minister needs the support of the DUP's 10 MPs to guarantee her majority in the House of Commons

'I very much hope that this week we will be able to conclude on two agreements,' she said.

In an article for the Belfast Telegraph overnight, Mrs Foster complained that progress in settling the deal had been 'slow'.

'Since the general election, we have been engaged with the Prime Minister and her team to explore how we can work together,' she wrote.

'Progress has been slow at times but we continue to work through the issues.

'I believe we are close to concluding an appropriate agreement with the Conservative Party to support a minority government on a confidence and supply basis.'

DUP leader Arlene Foster smiled as she arrived for talks at Downing Street with her deputy Nigel Dodds shortly after the election resulted in a hung parliament. But talks have dragged on for more than a fortnight

Alex Wild, Research Director at the TaxPayers' Alliance, said: 'Taxpayers resent politicians cooking up deals behind closed doors that invariably end with their cash being thrown wherever is politically advantageous rather than where it could be best spent.

'The unfair way in which money is allocated between the Home Nations has been clear for decades, best illustrated by the significantly higher levels of public spending in Scotland than in considerably poorer parts of England.

'But until there is a major decentralisation of tax raising powers, Westminster politicians will always have ultimate control of the purse strings and be able to dish out taxpayers' cash in a way that benefits them more than the general public.'