UKIP has won its first seats in the Welsh Assembly - while Labour retains power in the Senedd for a fifth successive term.
Labour raced ahead of other parties early on in the contest, despite an overall drop in its share of the vote compared with last time.
It has won 29 seats but it needed 31 seats to claim an overall majority.
It could now govern via a minority administration, or lead a coalition.
WATCH: Carwyn Jones tells ITV News it was disappointing for Labour to lose votes:
We always said this was the toughest Assembly election we had ever faced, and in that context we can be pleased to beat the Tories in every battleground seat. The country has been spared the chaos of a Tory/Ukip coalition.
LAB 29 (-1)
PLAID CYMRU 12 (+1)
CON 11 (-3)
UKIP 7 (+7)
LIB DEM 1 (-4)
While Labour's dominance has not come as a surprise to pollsters, the 2016 election in Wales has produced two surprises.
Plaid Cymru leader Leanne Wood rocked Labour by winning the Rhondda seat from government minister Leighton Andrews.
Nigel Farage's Ukip made history after winning their first place in the Senedd - despite the party being opposed to the Assembly's existence until 2013.
The party has claimed seven seats.
Watch: Our Political Editor Adrian Masters report's on the day's events
While Labour has left its rivals behind, the contest for second place between Plaid and the Conservatives had been neck and neck.
However, Plaid can lay claim to pulling off the biggest scalp of the night after Ms Wood's gamble to go head-to-head against cabinet minister Leighton Andrews paid off.
The former probation officer took 50.6% of the vote as well as causing a massive 21.1% swing in the process.
To win here, in the Rhondda, to win where you've lived all your life and grown up, is a real honour. A new dawn is about to break in Wales. People have voted for change.
In the constituency vote there were cheers of relief for the Liberal Democrats, who have avoided a total wipeout after leader Kirsty Williams's emphatic victory in Brecon and Radnorshire.
As well as increasing her share of the vote, Ms Williams's 15,898 votes were more than double that of the second place Tory candidate.
It will take a long time to rebuild the party, but I'm really proud that rebuild begins here.
There were mixed fortunes for the Welsh Conservatives. They lost three seats to finish with eleven AMs.
Speaking following the results of the 2016 National Assembly for Wales election, Welsh Conservative leader Andrew RT Davies said:
I am proud that we have fought a positive and engaging campaign, with excellent candidates across the country. Furthermore, along with my colleague and friend David Melding, it is a huge privilege to be elected to serve the people of South Wales Central once again. In this new era of five-party politics, we have strengthened winning positions in many held seats. Obviously, we are disappointed to lose some regional list seats in this election, and I pay tribute to those outgoing Members who have represented their areas with distinction and pride.
After all 40 constituency results in the Welsh Assembly election theturnout is:
1,019,382 (45.39% +3.93%)
Highest yet since first Assembly elections - 46% - in 1999
Largest swing after all 40 constituency results in the Welsh Assembly
Blaenau Gwent 27.73% swing Lab to PC
Rhondda 24.19% swing Lab to PC
Cardiff West 11.71% swing Lab to PC
Ynys Mon 11.29% swing Lab to PC
Aberavon 9.31% swing Lab to PC
Brecon & Radnorshire 8.59% swing C to LD
Pontypridd 8.18% swing Lab to PC
Neath 7.63% swing Lab to PC
Carmarthen East & Dinefwr 7.17% swing Lab to PC
Vale of Clwyd 7.11% swing Lab to C