The Ulster Unionists were the only party in Northern Ireland to make gains in the general election.
The DUP has won eight seats, Sinn Féin four, the SDLP held its three seats and one independent MP was elected.
The UUP's two seats means a return to the Commons for the first time in five years, having had no MPs since 2010.
The Ulster Unionist leader Mike Nesbitt said the Fermanagh and South Tyrone seat had been an election priority.
"After the local government [election] last year I took my blank page for this campaign and what I wanted at number one was to win back for unionism, off Sinn Féin, the most westerly constituency in the United Kingdom, because that sends out a massive positive message to unionism."
In 2010, Sinn Féin had held on to the seat by just four votes, but this time the UUP won with a majority of 530 votes.
The Fermanagh and South Tyrone constituency was one of four where there was an electoral pact between the UUP and DUP, the two main unionist parties in Northern Ireland.
DUP leader Peter Robinson said: "I trust that our two parties, the Ulster Unionist Party and the Democratic Unionist Party, can work in the interests of the union at Westminster, because the union is going to be under pressure from Scottish nationalists.
"Of course we will act responsibly, as a unionist I obviously want to see the interests of the United Kingdom moving forward and of course as someone from Northern Ireland I want to see it happening in the best interests of the people of Northern Ireland."
Sinn Féin leader Gerry Adams said his party had consolidated its vote.
"In many constituencies we faced a unionist pact held together by opposition to change, opposition to equality and in support of a union that is imposing austerity," he said.
"This was most evident in Fermanagh and South Tyrone where all shades of unionism combined with the Tory party to unseat a republican woman."
The DUP has regained the East Belfast seat lost five years ago by its party leader. This time, Gavin Robinson took the seat from Alliance's Naomi Long.
Mr Robinson, who polled 19,575, said: "I'm delighted that the last five long years are over."
He added: "When people of East Belfast were asked to vote for a shared future, they chose to share that future with somebody they can trust, rather than back a party that are only interested in offering us a future if we share their view".
Alliance leader David Ford said Mr Robinson's acceptance speech was the "nastiest" of all such speeches across the UK.
"Naomi had a fantastic personal vote, a very solid recognition of her work," he said.
On Friday, Gavin Robinson said: "I think Naomi Long is a formidable politician - I didn't say it in my speech last night, as I say, I'm reflecting this morning it's been long and difficult."
Despite the East Belfast result, the Alliance Party's Stephen Farry said: "Obviously we're very disappointed for Naomi personally and obviously we would have liked to win the [East Belfast] seat, but overall the results are actually very good for Alliance.
"We've actually had our biggest ever share of the vote in Northern Ireland in any election since 1992, almost 25 years.
"In virtually every constituency, indeed I think in every constituency across Northern Ireland, our share of the vote went up."
BBC NI Political Editor Mark Devenport
After five years in the Westminster wilderness, the Ulster Unionists are the comeback kids of this election. Mike Nesbitt's strategy had seemed risky - asking his supporters to back the DUP in some seats, but taking their old rivals head-on elsewhere.
But in the end the gamble paid off with two new Ulster Unionist MPs the reward.
The DUP compensated for the loss of Willie McCrea by recapturing East Belfast. Alliance may find solace in Naomi Long's increased vote, but in a first past the post election, winning is all that counts.
That's the same reality facing Michelle Gildernew, unable to defend the most marginal seat against the UUP.
With the Conservatives winning a narrow majority, Northern Ireland's MPs won't be kingmakers. But the 11 unionist and 3 SDLP members could still play an intriguing role in what remains a finely balanced House of Commons.
In South Antrim, Ulster Unionist Danny Kinahan, who is a cousin of the Irish singer Chris de Burgh, ousted the DUP's Willie McCrea.
Mr Kinahan put his victory down to "hard work and the people of South Antrim putting their faith in me".
"I think they wanted somebody who was from the patch, who was here all the time and they wanted change," he said.
"I think there was a mood here in South Antrim to have someone different and a different approach to how politics is done."
It was the first shock result of the night in Northern Ireland.
The defeated candidate, Mr McCrea, was first elected as an MP in 1983.
The first result of the night was Lagan Valley with Jeffrey Donaldson holding his seat for the DUP with 19,055 votes.
Ian Paisley, DUP, retained his North Antrim seat with 18,107 votes.
David Simpson, DUP, has held his seat in Upper Bann, with 15,430 votes. It was a constituency targeted by the Ulster Unionist's Jo-Anne Dobson who polled 13,166.
Nigel Dodds held the North Belfast seat for the DUP with 19,096 votes, the fourth time he has been re-elected.
In South Belfast, SDLP leader Alasdair McDonnell, retained his seat with 9,560 votes.
"On the doorsteps what I was getting was an indictment of the two main parties [the DUP and Sinn Féin] and equally issues about employment, health and education," he said.
"This was a tight election and quite honestly you get votes on the doorsteps and I was on the doorsteps day and night and I knew I had to fight for every vote and I fought for every vote."
Francie Molloy held his seat for Sinn Féin in Mid Ulster polling 19,935.
In East Londonderry, the DUP's Gregory Campbell was re-elected with 14,663 votes.
The SDLP's Margaret Ritchie regained her seat in South Down with 18,077 votes.
The last result of the night was Mickey Brady who won Newry and Armagh for Sinn Féin with 20,488 votes.
There were a total of 138 candidates in Northern Ireland and 1.2m people were eligible to vote.
Overall, the Democratic Unionist Party (DUP) stood in 16 constituencies while the Ulster Unionist Party (UUP) stood in 15.
Sinn Féin, the SDLP and the Alliance Party stood in all 18 constituencies.
The Green Party ran five candidates and UKIP ran in 10 seats.
Seven Traditional Unionist Voice (TUV) candidates were selected.
The Conservative Party ran in 16 seats. The Workers Party fielded candidates in five constituencies.
People Before Profit fielded a candidate in West Belfast and CISTA (Cannabis is safer than alcohol) contested four constituencies.
There were five independent candidates.
- Sylvia Hermon
- Jim Shannon
- David Simpson
- Conservative Party
- Sinn Féin
- TUV (Traditional Unionist Voice)
- Francie Molloy
- Sir Jeffrey Donaldson
- Nigel Dodds
- Alliance Party (Northern Ireland)
- SDLP (Social Democratic and Labour Party)
- UUP (Ulster Unionist Party)
- Paul Maskey
- UKIP (UK Independence Party)
- Sammy Wilson
- Ian Paisley
- Mickey Brady
- Green Party (Northern Ireland)
- DUP (Democratic Unionist Party)
- Gregory Campbell