Media playback is unsupported on your device Media caption Claire Sugden says taking the role of justice minister was a 'difficult decision'

A new team of ministers has been appointed to the Northern Ireland power-sharing executive.

Most of the posts have been shared out between the two biggest parties, the Democratic Unionists and Sinn Féin.

The executive was formed after independent unionist MLA Claire Sugden was appointed as justice minister.

Last week, Secretary of State Theresa Villiers warned there would be fresh assembly elections if the justice post was not filled.

The Ulster Unionist Party (UUP) and Social Democratic and Labour Party (SDLP) are forming an opposition.

The posts have been shared out using a system called D'Hondt, in which ministerial posts are allocated according to parties' representation in the assembly.

Under this system, the DUP, Sinn Féin, SDLP and Ulster Unionists would have been entitled to nominate. However, the SDLP and UUP declined to nominate a minster and are, instead, forming the first formal opposition in the assembly.

Ms Sugden said that while it would be a huge challenge, she felt she was "up to" the job of justice minister - a job that had been turned down by the Alliance Party.

"This is an opportunity for me, not only for me, but for the people of my constituency and the people of Northern Ireland," she said.

"I am a progressive person, I do look forward to working with my executive colleagues."

Image caption All of the executive ministers have now been announced

The DUP ministers are:

Simon Hamilton - minister for the economy

Peter Weir - minister for education

Paul Givan - minister for the department of communities

Michelle McIlveen - minister for agriculture, environment and rural affairs.

The Sinn Féin ministers are:

Máirtín Ó Muilleoir - minister for finance

Michelle O'Neill - minister for health

Chris Hazzard - minister for infrastructure.

Analysis: BBC News NI's economics editor John Campbell

Máirtín Ó Muilleoir is the first Sinn Féin minister to hold a major economic brief in the Northern Ireland Assembly.

Read more

The DUP's Simon Hamilton is only 39, but by the standards of this youthful executive he is a veteran, having previously served as minister of both finance and health.

Read more

Ms Sugden, 29, an assembly member for East Londonderry, succeeds Alliance Party leader David Ford as justice minister.

Shortly after her appointment, the DUP leader and First Minister Arlene Foster said: "This is a good day for Northern Ireland, the people will have a government in place today."

She added: "Martin [McGuinness] and I are delighted that Claire has agreed to be the new justice minister for the new mandate."

Analysis: BBC News NI's health correspondent Marie-Louise Connolly

The issues awaiting Northern Ireland's new health minister, Sinn Féin's Michelle O'Neill, are familiar and urgent.

Read more

Mr McGuinness, who formally nominated Ms Sugden, said that even though the independent MLA had sat in what he called "the naughty corner" in the assembly, he had been impressed by her.

"She is a very progressive young woman, someone who I think clearly understands the need to be a minister for everybody within our community."

Image caption Deputy First Minister Mr McGuinnesss said Ms Sugden is "a very impressive young woman"

However, Ulster Unionist leader Mike Nesbitt described Ms Sugden's appointment as a "corruption of the Good Friday Agreement".

"With one seat in the assembly, you get a seat at the executive table," he said.

"No wonder the Ulster Unionist Party opposed the devolution of policing and justice."

Image caption Ulster Unionist leader Mike Nesbitt described Ms Sugden's appointment as a "corruption of the Good Friday Agreement"

SDLP leader Colum Eastwood also said Ms Sugden's appointment was a corruption of the d'Hondt voting system for the Northern Ireland Executive.

He added: "It's very clear to our electorate that this is a position for which no nationalist need apply."

Announcing that his party would be going into opposition, Green Party leader Steven Agnew said it was no secret that he had previously taken part in discussions about accepting the justice post.

"We were very clear that we would only serve in government if we felt we could progress our agenda, if we thought we could achieve more in government than out of government," he said.

"But I think the reality was our agenda was completely different from the DUP's and Sinn Féin's, which is why I'm delighted that myself and Claire Bailey will be in opposition."

Analysis: BBC News NI's education correspondent Robbie Meredith

For the first time since the establishment of the assembly in 1998, Northern Ireland has a DUP education minister.

Read more.

Analysis: BBC News NI's home affairs correspondent Vincent Kearney

Claire Sugden will not have too far to look for a controversial issue in the world of justice.

Read more

Analysis: BBC News NI's agriculture and environment correspondent Conor Macauley

One challenge faced by the new agriculture minister, Michelle McIveen, will be to balance the executive's push for growth of the agri-food industry, without compromising environmental protections.

Read more.