Paul Givan has replaced Arlene Foster as first minister of Northern Ireland after the province’s main parties ended a stalemate that could have led to a snap election. Democratic Unionist Party (DUP) leader Edwin Poots nominated Mr Givan, 33, for the job despite significant opposition from within his own party over a deal struck with Irish nationalist rivals Sinn Fein. Michelle O’Neill of Sinn Fein was reappointed deputy first minister. Under the Protestant-Catholic power-sharing arrangement, one half of the executive needs to come from the DUP, while Sinn Fein makes up the other half. Sinn Fein had threatened not to fill the post of deputy because of a feud about protections for the Irish language. That would have dissolved the administration because a government can not be formed unless both roles are filled, according to the terms of the Good Friday Agreement. The language issue cuts to the heart of tensions between Northern Ireland’s mostly Roman Catholic nationalists, who see themselves as Irish, and Protestants, who largely identify as British. The Northern Ireland Assembly, in which the DUP is the largest party, has failed to pass a law ensuring protections for the Irish and Ulster Scots languages, despite the power-sharing parties agreeing last year to do so. After crisis talks with the two parties the UK government said on Thursday it would step in to avert an election and pass the legislation in the UK parliament if the Belfast assembly did not do it by September. Sinn Fein welcomed the move, with party leader Mary Lou McDonald saying it had broken the “logjam of DUP obstructionism.” However, the move was opposed by many in the DUP. BBC News reported that the vast majority of DUP MLAs – 24 to four – on Thursday voted against Mr Poots nominating Mr Givan as first minister. Now there is speculation that Mr Poots could be removed as DUP leader just weeks after he took the job from former first minister Arlene Foster, who resigned after criticism over her handling of Brexit. The party elected Mr Poots, a social and religious conservative, to replace Ms Foster as leader. He broke with tradition by deciding not to serve as first minister. The UK government retains an array of powers affecting Northern Ireland, but the Belfast Assembly can make laws in areas including agriculture, education and health. The power-sharing relationship has often been strained, and the UK’s split from the EU at the end of 2020 has further shaken the political balance in Northern Ireland. Post-Brexit trade rules have imposed customs and border checks on some goods moving between Northern Ireland and the rest of the UK, angering Northern Ireland’s British unionists who say the new checks amount to a border in the Irish Sea and weaken ties with the rest of the UK. Tensions over the new rules contributed to a week of street violence in Northern Irish cities in April that saw youths pelt police with bricks, fireworks and petrol bombs.