Media playback is unsupported on your device Media caption The chief whips from both parties sign the document

An agreement has been reached which will see the Democratic Unionist Party back Theresa May's minority government.

The deal, which comes two weeks after the election resulted in a hung Parliament, will see the 10 DUP MPs back the Tories in key Commons votes.

There will be £1bn extra for Northern Ireland over the next two years.

DUP leader Arlene Foster said the "wide-ranging" pact was "good for Northern Ireland and the UK" but one critic said it was a "straight bung".

Labour leader Jeremy Corbyn said the deal was "clearly not in the national interest", and Sinn Fein's Gerry Adams said it enabled a "Tory Brexit which threatens the Good Friday Agreement".

It has prompted calls for matching public investment in Wales and Scotland.

A three page document outlining the terms of the agreement has been published in full. The DUP said it would apply for the lifetime of the Parliament, scheduled to last five years, but would also be reviewed at the end of the current session in two years' time.

There will be £1.5bn in funding - consisting of £1bn of new money and £500m of previously announced funds - to be spent over the next two years on infrastructure, health and education in Northern Ireland, money Mrs Foster said was needed to address the challenges from Northern Ireland's "unique history".

As part of the deal, the military covenant will be implemented in full in Northern Ireland, meaning more focus on the treatment of military veterans, while the triple lock guarantee of at least a 2.5% rise in the state pension each year, and winter fuel payments, will be maintained throughout the UK.

Other key points of the agreement include:

The DUP will support the Tories on all Brexit and security legislation

The UK's 2% Nato defence spending target will continue to be met

Cash support for farmers will remain at current levels until the next election

Both parties to adhere to commitments in Good Friday Agreement

No Irish border poll without "consent of the people"

Mrs May shook hands with DUP leader Arlene Foster as she and other senior party figures arrived at Downing Street on Monday to finalise the pact. The two leaders then watched as Conservative chief whip Gavin Williamson and his DUP counterpart Jeffrey Donaldson signed the documents in No 10.

Speaking outside Downing Street, Mrs Foster said the agreement would bring stability to the UK government as it embarked on the Brexit process,

"This agreement will operate to deliver a stable government in the United Kingdom's national interest at this vital time," she said.

The price of keeping power

Analysis by BBC political editor Laura Kuenssberg

The Tories now face a bumpy day of criticism, about how the DUP have been bought off - £100m for each of their ten votes in Parliament. The other devolved nations will cry foul.

Some Tories too are deeply uncomfortable about the association with the DUP brand of unionism. And if the cuts are to be eased in Northern Ireland, what about other parts of the country?

But the money that's been found down the back of the Number 10 sofa for Northern Ireland may be worth it for Theresa May as the price of holding power, for now.

She now has her majority, whatever the cost, and a dividend could be the conclusion of a deal to get power sharing at Stormont up and running too.

Read Laura's blog in full

Welcoming the additional funding for Northern Ireland, she said it would benefit all communities. "Following our discussions the Conservative Party has recognised the case for higher funding in Northern Ireland, given our unique history and indeed circumstances over recent decades."

The UK prime minister said the pact was a "very good one" for the UK as a whole.

"We 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 UK," Mrs May said. "We very much want to see that protected and enhanced

First Secretary of State Damian Green, a close ally of Mrs May's, said he hoped the extra money would help revive devolved government in Northern Ireland.

Media playback is unsupported on your device Media caption Damian Green: Cash is to help devolved government

Media playback is unsupported on your device Media caption Carwyn Jones said a "magic money tree" had been found for Northern Ireland

"The money that is attached to this agreement is actually less than the money attached to the original Stormont agreement in 2014," he told the BBC. "We know Northern Ireland has particular needs, because of its history and difficulties.

"There are parts of the Northern Ireland infrastructure that needs particular help and that has been recognised on a continuing basis."

The BBC's political editor Laura Kuenssberg said most of the money being allocated to Northern Ireland would go to specific projects rather than general spending, meaning it would not necessarily impact on the Barnett formula which determines overall expenditure across the nations of the UK.

She said DUP sources pointed to the creation of a "coordination committee", suggesting this would give them a direct line in to government discussions and that this may prove particularly influential over the Brexit negotiations.

Northern Ireland has been without a devolved government since March and parties have until Thursday to find agreement.

The cash will go to the Northern Ireland executive if the devolved institutions are restored by the deadline of 29 June.

Image copyright PA Image caption The talks have taken two weeks to conclude

Image caption The two sides met in the Cabinet room

Image copyright Getty Images Image caption Before the deal was signed

Under the so-called "confidence and supply" arrangement, the DUP will line up behind the government in key votes, such as on the Queen's Speech and Budgets, as well as Brexit and security matters, which are likely to dominate most of the current Parliament.

On other legislation, the DUP's support is not necessarily guaranteed - although the Northern Ireland party is expected to back the majority of the government's programme for the next two years after many of its more controversial policies were dropped.

The support of the DUP will give Mrs May an effective working majority of 13, given that Sinn Fein do not take up their seven seats and Speaker John Bercow and his three deputies - two of whom are Labour MPs - do not take part in votes.

Several senior Tories had advised her to govern without any formal agreement with the DUP, arguing the unionist party would not be prepared to bring Mrs May down and run the risk of triggering a fresh election given their longstanding hostility to Jeremy Corbyn and other senior Labour figures.

Former PM Sir John Major warned that a formal association with the DUP could undermine attempts to restore power-sharing government in Northern Ireland while some MPs said the DUP's socially conservative stance on issues such as gay marriage and abortion could damage the party in the longer term.

Welsh First Minister Carwyn Jones suggested Mrs May was "throwing money at Northern Ireland while ignoring the rest of the UK", in what he called "cash for votes".

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

'Devil in the detail'

Mr Corbyn said public service cuts should be stopped "right across the UK, not just in Northern Ireland".

He demanded to know where the extra money for Northern Ireland was coming from, and whether other parts of the UK would get a similar cash injection.

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

Mr Adams, the president of Sinn Fein, said: "The Tory government has slashed more than £1bn from the block grant over the last seven years.

"The allocation of additional funds could help to ease the enormous pressure on our public services.

"The devil is in the detail."

'Faux outrage'

On the plan to implement the military covenant in Northern Ireland, Mr Adams added: "Sinn Fein will resolutely oppose any attempt to give preferential treatment to British forces, either in terms of legacy or the provision of public services."

In the Commons, MPs from other parties lined up to criticise the new arrangements, with the SNP's Pete Wishart saying it was a "pathetic grubby little deal" and accusing the Tories and DUP of "pork barrel politics".

But Nigel Dodds, the DUP's Westminster leader, said his party could publish details of its correspondence with Labour and the SNP at the time of previous elections.

"Some of the faux outrage we have heard is hypocrisy of the highest order," he said.

Mr Dodds said the extra investment would be "for every section of the community in Northern Ireland".