Arlene Foster remains safe as leader of the Democratic Unionist Party despite its disappointing performance in the Northern Ireland Assembly election, MP Jeffrey Donaldson has said.

The DUP stalwart said there is no question over Mrs Foster's future and she will be back to take the lead at Stormont.

The pro-Brexit party narrowly remained the region's largest by just one seat as Sinn Fein enjoyed major gains in the snap election.

The DUP previously had 10 seats more that Sinn Fein.

Mr Donaldson said that despite the bruising result, the DUP is still the largest party and its focus now "is on Arlene and the party getting a government up and running again at Stormont".

He said: "I am not aware of any election in the past where the leader of the largest party resigns because they have won the election.

"We need to learn the lesson and understand what people were saying in this election and what the key messages are.

"We have been given the responsibility as the main party to take the lead at Stormont and that is what we intend to do, so we are not going to get bogged down on what some people want to focus on which is personalities.

"Arlene is leading the largest party and we need to get on with the job of forming a government that works for us all."

Sinn Fein and the DUP now have three weeks to establish a government.

If agreement cannot be reached in that time, then, under law, another election will be called.

But Mr Donaldson said: "If we can't get a government formed within three weeks I don't think the Westminster Government will allow another election. I think they will introduce direct rule.

"We are determined to work to achieve (powersharing government) but if it doesn't happen I fear we could be looking at a lengthy period of direct rule."

Former Northern Ireland Secretary Theresa Villiers told the BBC the Government could legislate to give the DUP and Sinn Fein more time to negotiate.

Sinn Fein's leader in the north Michelle O'Neill has said a "big job lies ahead" in terms of getting Stormont up and running.

"We have to go in there wanting to find a way forward. But we have to have fundamental change from the DUP," she said.

"There is a hard road in front of us in the next three weeks but Sinn Fein is coming at it trying to find a way forward."

Just 1,168 first preference votes separated the DUP and Sinn Fein and, for the first time, unionists will not have an overall majority at Stormont.

Amid the fallout, Mike Nesbitt said he would resign as Ulster Unionist leader.

It was a positive campaign for both the SDLP and Alliance, who both maintained their seats.

SDLP leader Colum Eastwood said the return of 12 MLAs to a reduced Assembly was a statement of intent as the party had arrested a period of decline.

"This is the first time since 1998 that we have recorded gains. The SDLP is on the move," he said.

The SDLP's Alex Attwood, the UUP's Danny Kennedy and the DUP's Nelson McCausland and Lord Morrow were four former executive ministers who failed to secure a return to a Stormont legislature that is being cut from 108 to 90 members.

Other casualties include the UUP's Jo-Anne Dobson, former DUP minister Jonathan Bell, who stood as an independent, and People Before Profit's Eamon McCann, who was elected as an MLA last May but lost his seat in Foyle.

The election was called after the collapse of a coalition led by Mrs Foster's DUP and Sinn Fein's Martin McGuinness.

Mr McGuinness resigned over Mrs Foster's refusal to step aside as first minister pending an inquiry into the Renewable Heat Incentive scheme, which could cost the Northern Ireland taxpayer £490 million.