Arlene Foster and Michelle O’Neill stress need for unity as they take up senior roles

The Northern Ireland assembly has reopened for business almost three years to the day after it and the power-sharing executive in the region collapsed.

At an unprecedented Saturday sitting of the regional parliament, assembly members elected the Democratic Unionist party (DUP) leader, Arlene Foster, as first minister, Sinn Féin’s deputy leader, Michelle O’Neill, as deputy first minister and her colleague Alex Maskey as the chamber’s speaker

Will Northern Ireland's new power-sharing assembly survive? Read more

Accepting the post, Foster said the past three years had “focused too much on derision and division” and it was now “time for Northern Ireland to get moving forward again”. She said she wanted “everyone to be welcome in Northern Ireland. Regardless of our differences we must seek common ground”.

O’Neill echoed Foster’s tone. “As we approach the centenary of partition let’s not refight battles of the past. It is time to bring people together,” she said. “We can open doors and we can let this future in. We must give people hope and our young people opportunity. It is my sincere hope that 2020 is a time of real change which reinvents the optimism and hope we have experienced before, but our young people have not.

“It is time now for parties to have courage, as we choose hope over fear and enter a new era of politics in this society.”

Boris Johnson hailed the restoration of powersharing as a momentous day. He said: “As we begin a new decade, we can now look forward to a brighter future for all in Northern Ireland with an executive that can transform public services and improve people’s lives.

“The parties of Northern Ireland have shown great leadership in coming together to accept this fair and balanced deal in the interests of everyone in Northern Ireland.

“After three years without devolved government, an executive can now get on with the job of delivering much needed reforms to the health service, education and justice.”

The elevation of Maskey produced the first sour note of the resurrected parliament. The hardline Traditional Unionist Voice leader, Jim Allister, described it as the first “carve-up” deal between Sinn Féin and the DUP. O’Neill, however, said that “Maskey can be a voice for everyone”.

A victim of repeated attempts by loyalist paramilitaries to assassinate him in the early 1990s, Maskey was elected speaker by 51 votes out of 83. The other main contender for the role was Patsy McGlone of the nationalist SDLP.

Facebook Twitter Pinterest MLAs attend Stormont on Saturday. Photograph: Kelvin Boyes/Northern Ireland assembly/AFP via Getty Images

The new power-sharing government will include all five main parties. The DUP, Sinn Féin, the SDLP, Alliance and the Ulster Unionists (UUP) agreed to enter into the administration.

There had been some doubt earlier on Saturday that the UUP would take up the one ministerial post it is entitled to. One faction in the party argued that the parliament needed a robust opposition to hold the DUP-Sinn Féin government to account.

Steve Aiken, the UUP leader, defended the move to go into government. “The mood of the people is to get effective government back. The best way to hold the DUP and Sinn Féin to account is with the UUP in the executive,” he said.

Naomi Long, the leader of the cross-community Alliance party, confirmed before the vote to elect a speaker that the two largest parties had offered her the justice ministry. The justice minister’s position is one of the most controversial aspects of creating a new power-sharing government, because the department exercises control over the police and the courts.

At the core of the deal that has revived devolution was a plan by the British and Irish governments to create two new “language commissioners” as part of a cultural policy to put Irish on a legal par with English while protecting Ulster British culture.

In the strategy pursued by London and Dublin, as well as dangling the prospect of nearly £2bn in extra funding for Northern Ireland’s NHS, education system, infrastructure and police, the two governments said that if parties failed to reach an agreement by Monday there would be fresh assembly elections.

The DUP and Sinn Féin, suffered significant losses in the UK general election, particularly to the centrist Alliance party, which doubled its vote share, and a resurgent SDLP.

This week had marked the third year since the power-sharing agreement collapsed. Sinn Féin withdrew from the regional government after the DUP’s role in a botched green energy scheme that wasted hundreds of millions of pounds.

It is understood that Johnson and his Irish counterpart, Leo Varadkar, will visit Belfast on Monday to meet the first minister and deputy first minister, and pledge their backing for the new power-sharing executive.

The taoiseach said the restoration of power-sharing marked a “historic day” for Northern Ireland.

“All parties and politicians in Northern Ireland are to be commended for their decision to put the people they represent first and make measured compromises to reach a deal,” he said.

“I look forward to working with representatives in Northern Ireland as they begin working together again on behalf of all people in Northern Ireland.”

The former US president Bill Clinton tweeted: “I care deeply about the people of Northern Ireland, and I’m thankful their leaders are coming together in the spirit of the Good Friday Accords to stand-up the Executive and restore the government functions that people of all communities require.

“I remain hopeful that Brexit will respect the Good Friday Accords and the sacrifice and vision of so many people, more than two decades ago.”

Outside parliament buildings, at the foot of a statue of Edward Carson, the leader of unionist resistance to home rule for Ireland at the start of the 20th century, there was a handful of hardline loyalists waving union flags and angrily denouncing the DUP for treachery. They were outnumbered by tourists in raincoats who were taking photos from the top of a doubledecker bus touring around Stormont.