Photos from Northern Ireland general election night
One of the most closely watched constituencies in Northern Ireland was East Belfast, where the Alliance Party's Naomi Long unseated DUP leader Peter Robinson in 2010. This time around, the DUP's Gavin Robinson took the seat.
As in East Belfast, the Ulster Unionist Party stepped aside in North Belfast for the Democratic Unionist Party, who returned the favour in Fermanagh and South Tyrone and in Newry and Armagh. Nigel Dodds of the DUP was returned in North Belfast with 19,096 votes, a majority of 5,326 over Sinn Féin's Gerry Kelly.
DUP leader Peter Robinson (right) was at the Belfast count to celebrate with Gavin Robinson and Nigel Dodds.
In South Belfast, SDLP leader Alasdair McDonnell was elected with a reduced majority of 2.3%, his 9,560 total beating DUP candidate Jonathan Bell by 906 votes.
Sinn Féin's Máirtín Ó Muilleoir (left) came fourth in the South Belfast poll with 5,402 votes. In 2010, Sinn Féin did not field a candidate in the constituency.
Three of Northern Ireland's 18 seats have changed hands. In South Antrim, Ulster Unionist Danny Kinahan unseated veteran DUP figure William McCrea, beating him by 949 votes. While Mr McCrea is known for his gospel singing, Mr Kinahan also has a musical connection as he is a cousin of the singer Chris De Burgh.
In 2010, Sinn Féin's Michelle Gildernew took Fermanagh and South Tyrone by the narrowest of margins. This time around, Ulster Unionist candidate Tom Elliott - a unionist unity candidate - won the seat with a 530-vote majority.
In Newry and Armagh, Sinn Féin's Mickey Brady saw off the challenge of candidates including the UUP's Danny Kennedy - his party's second unionist unity candidate in its pact with the DUP - and former Armagh Gaelic footballer Justin McNulty of the SDLP.
Upper Bann saw the DUP's David Simpson hold on to his seat with a 2,264 majority in the face of challenges from the UUP's Jo-Anne Dobson and Sinn Féin's Catherine Seeley.
In North Antrim, the DUP's Ian Paisley retained the seat with a 11,546 majority.
The SDLP's Mark Durkan was joined by his wife Jackie and a crowd of supporters to welcome him being re-elected as Foyle MP with an increased majority.
Well-wishers gave the thumbs up to Sinn Féin's Pat Doherty, who was returned in West Tyrone with a 10,060 majority.