SINN Féin’s Francie Molloy retained the Mid-Ulster Westminister seat but the party’s share of the vote was down.
He replaces deputy first minister Martin McGuinness as the MP for Mid Ulster after he stood down at the end of last year in an attempt to end double jobbing.
Mr Molloy won the seat with 17,462 votes while Unionist Unity candidate Nigel Lutton came second with 12,781.
Speaking at the count centre in Cookstown on Thursday, Mr Molloy said: “We were contesting against the deputy First Minister, so that was a very hard act to follow and hopefully we will fill those shoes.”
The Assembly’s outgoing principal deputy speaker had previously been accused of involvement in the murder of Mr Lutton’s RUC father.
The claims were made by DUP MP David Simpson in the House of Commons, under parliamentary privilege.
Mr Molloy has always denied the allegations, and said although overall it had been a fair fight, in recent weeks attempts had been made to “manipulate and cynically use” his past.
But Mr Molloy revealed he had greeted the Unionist candidate on Thursday, with Mr Lutton adding: “You’ve got to be decent to everyone.”
There was a low turnout of 55% at the polls, which opened at 7am on Thursday and closed at 10pm the same day.
The Sinn Féin share of the vote reduced from 52% in 2010 to just under 47%, but Mr Molloy said that was to be expected in a by-election.
He was congratulated in his victory by the outgoing MP, Martin McGuinness, who held the Mid Ulster seat for 15 years.
The deputy First Minister blamed speculation about the election for the drop in votes for his party.
“The media said Francie Molloy is home in a boat, Nigel Lutton has no prospect whatsoever and I think a certain amount of complacency sets in,” he said.
“For us it was a tremendous result of 17,000 votes. A great result for Francie Molly and a great result for Sinn Féin.”
But unionist voters made their voice heard as they cast their ballots and the parties claim their vote has increased.
Nigel Lutton said he was “relieved and humbled” to receive more than a 34% share.
“As a nobody coming in I was not expecting to increase the Unionist vote,” he said.
The funeral director added that he had been described as “the undertaker that resurrected unionism.”
Mr Lutton, a former member of the Victims’ Forum, said the increased cooperation within unionism and raised vote “has made it all worthwhile”.
However, he said following his three week campaign he had no major plans to continue a career in politics.
“One day at a time,” he commented. “Back to work tomorrow.”
Members of both the UUP and DUP supported Mr Lutton at the count centre, where UUP leader Mike Nesbitt congratulated their candidate and Sinn Féin.
“I hope that’s the last time Sinn Féin fields an abstentionist candidate because that’s yesterday’s politics,” he said.
“I’m delighted for Nigel and for Mid Ulster. This changes Mid Ulster.”
Two members of the UUP left the party when the plans to field a single unionist candidate were revealed, but that did not seem to faze Mr Nesbitt.
He described Mr Lutton’s election quest as “an experiment” and said the results would be analysed, before hinting at further cooperation in future elections.
“I do not believe in unionist unity, this is unionist cooperation,” he added.
SDLP MLA Patsy McGlone polled 6,478 votes, a rise of more than 3 per cent since the 2010 election.
Alliance party candiate Eric Bullick polled 487 votes, a rise of less than 1 per cent.