Theresa May has finally secured a costly deal with the Northern Irish DUP to prop up her weakened government following weeks of painstaking negotiations.

Early indications showed Ms May had been forced to ditch election manifesto commitments, promise £1bn of extra spending and even lucrative new tax powers to Northern Ireland to secure the DUP's support.

Documents revealed that the deal will be reviewed after two years, giving the DUP the chance to make further demands of the UK Government if the Conservatives wish to continue the arrangement past 2019.

The Prime Minister claimed the agreement would be a "very, very good one", despite a backlash from other parts of the UK and concern that tying her government to the socially conservative DUP will drag the country further to the political right.

After a round of talks at Downing Street between Ms May and DUP leader Arlene Foster, the Prime Minister said prosperity, security, Brexit and the value of the union were key to the deal.

She said: "So the agreement we have come to is a very, very good one, and we look forward to working with [the DUP]."

But it was DUP leader Ms Foster who gave more detail outside Downing Street, telling reporters both parties now agreed there will be no change to the pensions triple lock and the universal nature of the winter fuel payment, things Ms May had pledged to change at the election.

Why the DUP is so controversial

She also said the Tories had now recognised the case for higher funding in Northern Ireland including for large infrastructure projects.

She said: "Our aim in these negotiations has been to deliver for all of the people of Northern Ireland and the support measures which we are announcing will be to the benefit of all our people."

Details later published by the Government showed Downing Street has promised £200m extra per year for two years to pay for new infrastructure and a further £75m per year for boosting broadband.

The DUP also squeezed Ms May for an extra £50m per year to address "immediate pressures" on health and education spending in Northern Ireland, plus an extra £100m per year for a broader "health service transformation".

Finally there is a commitment for the UK Government to hand an extra £10m per year for five years to Northern Ireland to pay for mental health provision and £20m every year over the same period to target "pockets of severe deprivation".

A Whitehall paper also revealed that new more flexible spending rules will be implemented to allow more scope over how devolved funding can be spent.

Theresa May responds to John Major criticism over DUP deal

The note also pointed to a major handing-over of tax powers, saying: "The UK Government notes that one of the first tasks for the new executive will be to work towards the devolution of corporation tax rates, the timetable for its introduction, and how this might best be flexibly managed, with options being developed for Autumn Budget 2017."

Ms Foster also explained that both parties are agreed on the need to meet the Nato commitment of spending 2 per cent of GDP on the armed forces and fulfil the Armed Forces Covenant.

The agreement was signed by Tory chief whip Gavin Williamson and the DUP's Sir Jeffrey Donaldson, while Ms May and Ms Foster, along with Damian Green and Nigel Dodds, watched on.

Ms May has been forced to assure her MPs that the deal will not affect the Government's stance on LGBT rights, given that DUP MP Ian Paisley Jr, son of the party’s founder, has previously called homosexuality "immoral, offensive and obnoxious" and said he was "repulsed" by gays and lesbians.

Sinn Fein's Gerry Adams warns of prospective DUP government deal

The party once even championed a campaign called "Save Ulster from Sodomy".

Labour Welsh first minister Carwyn Jones said: "Today’s deal represents a straight bung to keep a weak prime minister and a faltering government in office."

After the deal was signed the Prime Minister urged parties to come together and reach agreement to re-establish a powersharing executive by June 29 in Northern Ireland, where Sinn Fein has claimed the DUP breaches the Good Friday Agreement.

Ms May said: "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.