Labour has hailed a "fantastic" result in the general election in Wales after taking back Gower, Cardiff North and Vale of Clwyd from the Tories.
They also fought off fierce Tory battles for Bridgend and Wrexham, winning 28 seats, three more than 2015.
The results represent a huge blow to the Tories who had hoped to make big gains across Wales in the snap election ahead of Brexit negotiations.
Plaid Cymru won four seats but the Liberal Democrats lost their only MP.
Across the UK, the Tories won 318 seats, Labour 262, the SNP 35 and the Lib Dems 12. It means no single party has the 326 seats required to form a majority government.
Businesses in Wales have called for political assurances in the wake of the vote, with 10 days to go until Brexit negotiations begin.
- General Election 2017 as it happened
- General election picture around the UK
- The general election in Wales: Party-by-party analysis
- Conservative campaign 'too personal'
- Welsh Labour's Goldilocks election?
- Election 2017: A dreadful night for Welsh Tories
- Election young turnout 'remarkable'
- Wales' new faces at Westminster
Labour First Minister Carwyn Jones said: "These are fantastic results in Wales. We had pulled out all the stops. We went out to listen to people, speak to people on the doorstep."
He said Labour leader Jeremy Corbyn had managed to "capture young voters".
"Jeremy went round campaigning tirelessly around the whole of the UK listening to people," he added.
Mr Jones said the election results should spell the end for Theresa May, saying "it's difficult to see how she can continue", however, the prime minister has said she will not step down.
She confirmed her party would seek to run a minority government with help from the Democratic Unionist Party after her audience with the Queen on Friday afternoon.
Mrs May said outside Downing Street she intends to form a government that will provide "certainty" and guide the country through Brexit talks.
Meanwhile, Labour's Owen Smith celebrated his re-election in Pontypridd and congratulated his former party leadership opponent Mr Corbyn - who he had previously targeted for criticism - for Labour's "excellent performance".
He said he had been "clearly wrong" about Mr Corbyn's ability "to do this well".
Labour's share of the vote in Wales was 48.9%, its highest since 1997 and a 2.9% swing from the Conservatives, while the turnout was 68.5% - up 2.9% on 2015.
Gower was a significant victory for Labour who lost it for the first time in more than 100 years in 2015 to the Tories by 27 votes.
However, Tonia Antoniazzi has taken the seat from Byron Davies with a majority of 3,269.
In the swing seat of Cardiff North, Anna McMorrin's 4,174 majority at the expense of Craig Williams is the biggest in 20 years as her party claimed 28 seats in Wales. She said her team had fought a "positive, energetic campaign".
Labour also recorded majorities of more than 12,000 in Llanelli and Cardiff Central with shadow defence secretary Nia Griffith and Jo Stevens respectively.
Chris Ruane said he was "elated" to win back Vale of Clwyd, adding one of his priorities was to ensure the constituency did not lose out financially from Brexit.
In a bruising night for the Conservatives, they lost out on key seats and also missed out on taking two of their targets in Bridgend and Wrexham - which Prime Minister Theresa May visited during campaigning.
Senior Welsh Tories including Welsh Secretary Alun Cairns, Stephen Crabb and David Davies held on to their seats but with reduced majorities.
The Conservatives won eight seats in Wales - three fewer than in 2015.
Welsh Conservatives leader Andrew RT Davies admitted there had been shortcomings in the Tory campaign but denied he had not been entirely committed to it.
He said he had chosen to go away to celebrate his wedding anniversary instead of taking part in a TV debate "because it's important to me and my family".
"I was travelling the length and breadth of Wales supporting our colleagues," he told BBC Radio Wales' Good Morning Wales.
"There were flaws in our campaign and that will be taken up by the party."
Preseli Pembrokeshire MP Mr Crabb maintained the motivation for holding an election ahead of the start of Brexit negotiations had been "entirely right and proper".
He added: "Clearly something has gone wrong because the country has wanted to talk about other issues at this election time.
"They wanted to raise other concerns and there are a whole lot of new voters who were less concerned about Brexit and more concerned about issues to do with quality of life and their economic security into the future."
Plaid Cymru's victory in Ceredigion, after two recounts, the Lib Dems were left without a Welsh MP for the first time since 1859.
Welsh Lib Dem leader Mark Williams was ousted by Ben Lake following two recounts, with 104 votes between them.
Lib Dem leader Tim Farron paid tribute to Mr Williams, calling him a "powerful voice for Wales, Ceredigion and rural communities everywhere".
Chairwoman of the Welsh Lib Dem's national executive committee Carole O'Toole said the lack of representation for her party a "sad day for liberalism in Wales".
"Wales has lost a true liberal voice in Westminster, a voice fighting for a more open, tolerant country. Mark Williams has worked tirelessly for the communities of Ceredigion and for Wales since 2005."
She said it was a "difficult result" and the party needed to take "stock and consider how we move forward".
Elsewhere, Plaid Cymru held on to Arfon with Hywel Williams winning by 92 votes, and also Carmarthen East and Dinefwr, and Dwyfor Meirionnydd.
But it failed to gain its key Rhondda target seat from Labour, and also fell to third place in Ynys Mon.
Plaid leader Leanne Wood said the party had "matched its best ever performance in a Westminster election" after gaining four seats for the first time since 2001.
She added: "In an election that has been heavily polarised and falsely framed as a binary choice between the two biggest London parties, Plaid Cymru has bucked the trend and made a gain while other parties have made heavy losses."
However, former leader of Plaid in the commons, Elfyn Llwyd, criticised the party's "dull tactics", saying its targeting policy was "all wrong" during the election.
Neil Hamilton, UKIP's Welsh assembly group leader, also said his party had "been squeezed" in this election where they have not picked up any seats. He came fourth in Carmarthen East and Dinefwr.