It came after fellow UUP candidate Danny Kinahan ousted the DUP's William McCrea, making the Ulster Unionists the only party to make gains.

UUP leader Mike Nesbitt was delighted and said: "This is the best result unionism has had for over a decade.

"We have taken a seat off Sinn Fein. That is a signal which is going to go across the whole of Northern Ireland.

"Unionism is no longer on the back foot."

Mr Elliott was among four candidates agreed as part of a unionist pact.

The DUP had asked voters to back the well-known farmer who was standing under his UUP banner and smaller parties including the Traditional Unionist Voice (TUV) and Ukip did not field candidates effectively giving Mr Elliott a clear run.

Following a declaration which came just after 5.30am, Mr Elliott said: "This was a combined effort. It just shows you what you can do when there is a combined effort."

In 2010 Ms Gildernew, a former Stormont agriculture minister, won by just four votes - a margin reduced to a single ballot paper after a review by the electoral courts.

This time round the mother of three from Dungannon polled 23,078 votes.