British Prime Minister Theresa May struck a deal on Monday to prop up her minority government by agreeing to 1 billion pounds($1.3 billion) in extra funding for Northern Ireland in return for the support of the province's biggest Protestant party.
Talks had dragged on for more than two weeks after May lost her majority in parliament on June 8 with a failed gamble on a snap election
The Democratic Unionist Party (DUP) and its 10 lawmakers will now support May's Conservatives in key votes to keep the government in power, although not as a coalition.
There has been some concern among lawmakers about the deal because of the fragile peace agreement in Northern Ireland.
May and DUP leader Arlene Foster presided at the signing of a deal at Downing Street. They smiled and joked as negotiators from both sides, the DUP's Jeffrey Donaldson and the Conservatives' Gavin Williamson signed the deal that will run for the life of the current parliament due to end in 2022.
"I welcome this agreement which will enable us to work together in the interest of the whole United Kingdom, give us the certainty we require as we embark on our departure from the European Union, and help us build a stronger and fairer society at home," May said in a statement.
As part of the deal, May agreed to increase spending in the province by 1 billion pounds ($1.27 billion) over two years while the DUP agreed to support May on her budget, Brexit laws, national security and her overall legislative plan.
"Today we have reached an agreement with the Conservative Party on support for government in parliament," DUP leader Arlene Foster said in Downing Street. "This agreement will operate to deliver a stable government in the United Kingdom's national interest at this vital time."
A deal allows May to pass in the 650-seat parliament, and stay in power as she attempts to negotiate Britain's exit from the European Union.
But May's position remains insecure. Her Brexit strategy is under scrutiny and her future as prime minister is the subject of public debate.
Some senior Conservatives have voiced unease at a deal with the DUP, saying it could put at risk the 1998 peace settlement in Northern Ireland, known as the Good Friday Agreement. Foster said a deal with May could help drive a second deal on power sharing in the province.
Northern Ireland 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 the compulsory coalition between Irish Catholic nationalists and pro-British Protestant unionists.
The latest deadline set by the British government for the parties in Northern Ireland to reach an agreement is Thursday. Sinn Fein said last week that "time was running out" given the lack of knowledge about the impact of any Conservative/DUP deal.
"Time is running short for the parties to come together and reach agreement to re-establish a power-sharing," May said. "Northern Ireland needs a functioning devolved government at this important time."