Labour have gained three seats in Wales - taking all of them from the Conservatives.
Theresa May's party failed to achieve its hoped for breakthrough.
Cardiff North, Vale of Clwyd and Gower all fell to Labour candidates.
Labour are now on course for their highest share of the Welsh vote since Tony Blair's first landslide victory in 1997.
In Cardiff North the Labour candidate Anna McMorrin took more than 50 per cent of the vote, pushing out Craig Williams from the Conservatives.
In the Vale of Clwyd Labour's Chris Ruane regained the seat he lost in 2015. He won with 19,423 votes, compared to the 17,044 votes for James Davies for the Conservatives.
A Welsh Labour spokesman said it was "increasingly clear that Welsh Labour's campaign has connected positively with voters across Wales".
He said: "Given that at the beginning of the campaign polls put us ten points behind and losing more than ten seats, this is a remarkable turnaround, and shows the strength of our Welsh Labour campaign."
He added that it was "clear that the Tories are having a terrible night in Wales".
"They are not just failing to take seats - they are losing them, and seeing majorities slashed elsewhere," he said.
In Gower, the most marginal seat in Wales, Labour's Tonia Antoniazzi won with 22,727 votes over the Tory candidate Byron Davies' 19,458 votes.
Ms Antoniazzi said the last six weeks had been the best of her life and added: "I promise to you that with every fibre of my body I will work tirelessly to give you the representation that you and your family deserve."
Mr Davies said he had "thoroughly enjoyed" his two years as member of parliament for Gower.
The Conservatives also failed to take Wrexham, which they had hoped to win.
A Tory source said that result was "truly disappointing for the party in Wales and must be heartbreaking for Andy Atkinson, who campaigned with all his heart for that seat".
Labour's Paul Flynn, who was re-elected to Newport West - a seat he has held since 1987 - said the election would be the end of Theresa May's career.
"I would like to say how thrilled, exhilarated I am about the welling up of idealism among young people," Mr Flynn, 82, said.
"As someone approaching the halfway point of my parliamentary career, I am grateful to Theresa May for giving me another five years.
"We can look forward with great excitement to the future of those young people, politicised now by hope, by idealism, by integrity.
"They will counter the politics of grab and greed of the present government.
"This election has been a piece of cheap, cynical opportunism by the prime minister and she will pay for it by the ending of her career in a very short time."