The nationalist party had its best ever performance in Northern Ireland election history
Sinn Fein has cut the DUP's 10-seat Stormont advantage to a single seat in its best performance in Northern Ireland election history.
The Democratic Unionist Party won 28 of the 90 seats to narrowly remain the largest party in Northern Ireland by just over 1,000 votes.
Both parties will now have three weeks to form a new power-sharing government to avoid devolved power returning to Westminster for the first time in a decade, but relations between the two are at their lowest since power-sharing began in 2007 and Sinn Fein has demanded the resignation of outgoing first minister Arlene Foster as one of its terms for re-entering government.
Sinn Fein won 27 seats, the SDLP got 12, the UUP won 10, Alliance eight, the Green Party two, People Before Profit one seat, Traditional Unionist Voice one and there was one independent unionist.
The elections - triggered by the collapse of devolved government in Northern Ireland six weeks ago following controversy over a botched green energy scheme - saw turnout hit its highest level, 65%, in almost two decades.
DUP leader Arlene Foster told supporters after winning re-election: "Let us now move forward with hope, hope that civility can return to our politics.
"There is work to be done to quickly mend the relationship which has been frayed by the discord of this election."
The result is the closest nationalists had come to becoming the largest party in Stormont, but the DUP's failure to win at least 30 seats means it also no longer has the power to veto legislation, including the blocking of same-sex marriage in Northern Ireland.
Ulster Unionist leader Mike Nesbitt, who announced his resignation after his party's poor showing said: "In pure terms, the buck stops here. Some day Northern Ireland will vote as a normal democracy.
"We will vote in a post-sectarian election, but it's now clear it will not happen during the duration of my political career."
Michelle O'Neill, Sinn Fein's northern leader, said: "I think it's a brilliant day for equality, I think it's a great day for democracy."
The nationalist SDLP fared better than expected, replacing the UUP as the third largest party in the Assembly, and SDLP leader Colum Eastwood has said he will consider joining any new power-sharing government.
If the three-week deadline to strike a power-sharing deal expires, the Government could be forced to call another snap election or could opt to reintroduce direct rule.
Four former Northern Ireland Executive members - the SLDP's Alex Attwood; the UUP's Danny Kennedy and the DUP's Nelson McCausland and Lord Morrow lost their seats in the election.
In the previous Assembly election last May, the DUP won 38 seats compared with Sinn Fein's 28.
Northern Ireland uses the single transferable vote system - a form of proportional representation - to elect members of the Legislative Assembly. Unlike the first past the post system, it ensures the number of seats each party wins reflects its vote share.