There was jubilation among Conservatives in Wales as the party achieved its best results since the heyday of Margaret Thatcher, even winning in once rock-solid Labour seats such as Wrexham, which has never before returned a Tory MP.

Labour remained the biggest party in Wales with 22 of the 40 seats, down six on 2017, while the Tories were up six on 14. Plaid Cymru held on to its four seats.

Among the winners for the Tories was the former Welsh secretary Alun Cairns, who quit the cabinet at the start of the campaign after a row about what he had known about a former aide’s involvement in the collapse of a rape trial. Despite the scandal, he held on to his seat in the Vale of Glamorgan in south Wales.

One of the most spectacular Tory victories was Wrexham in north Wales, which had been held by Labour since 1935 but where Sarah Atherton, a former soldier, nurse and owner of a microbrewery, took the seat with a majority of more than 2,000. Atherton and two others became the first female Tories to be elected as MPs in Wales.

People who had backed Labour all their life deserted the party. At one of the covered markets in the town centre, Mike Evans, a butcher, said he had voted Tory but sighed when asked if he liked Boris Johnson. “I think he’s the best of a bad bunch,” he said.

Mike Evans voted Tory: ‘Things can’t get worse.’ Photograph: Gareth Phillips/The Guardian

Evans’ family has run a butcher’s business since 1911 – even longer than Labour has held Wrexham. He has voted Labour in the past but said: “I didn’t believe in Jeremy Corbyn’s policies – his changes to public services went too far. We’d have gone backwards. Wrexham has been Labour for too long. We need a change. Things can’t get worse.”

Boris Johnson’s Brexit message resonated among Welsh Labour leave voters. Steven Vale, the owner of Caroline’s Viennese Patisserie in Central Arcade, used to vote Labour but has no time for Corbyn and voted Tory this time.

Steven Vale: ‘There’s more to politics than Labour.’ Photograph: Gareth Phillips/The Guardian

He said: “It’s about time people realised there’s more to politics than Labour. Especially when we’ve lost all the industry, the coalmines, the steelworks. We’ve had a Labour Welsh government for 20 years. Have they tried to improve the hospitals? All they do is blame the government in Westminster for not giving them enough money.”

Yvette Moss, a local government worker, said she had stuck with Labour. “This place was decimated by Maggie Thatcher. I’ve seen how austerity has affected local government and people at the lower end.”

The soul-searching was beginning for Labour activists. Mary Wimbury, the defeated Labour candidate in Wrexham, said Corbyn had to go. “He was by far the biggest issue on the doorstep,” she said.

Adrienne Jeorrett, a hard-working Labour councillor in Wrexham, said she was shocked at the size of the Tory win there. “I don’t understand how people are not seeing what I’m seeing – the homelessness, the food banks, the holiday hunger, the period poverty, the increase in children being taken into care,” she said.

Labour councillor Adrienne Jeorrett: ‘Why aren’t people drawing the dots?’ Photograph: Gareth Phillips/The Guardian

“How are people not understanding that’s because we’ve got a Tory government. Am I wrong? Am I in a bubble? Why aren’t people drawing the dots? I find it very distressing. I just don’t understand. It’s very painful.”

Jeorrett added: “We do have to look at the leadership. They really, really need to listen to Labour party members and what our experience has been. They have got to listen to those conversations we have with people.”

The Labour leader in Wales, Mark Drakeford, a Corbyn ally, sent his congratulations to Johnson, with the reminder that he only had a majority in England.

Delwyn Derrick, a Plaid Cymru supporter, said he was angry that so much attention was being paid to Johnson’s “amazing majority”. “It’s only a majority in England, not in Wales, Scotland or Northern Ireland,” he said.

Derrick said a Tory MP was bad news for Wrexham. “This is a working-class town. My grandfather would be turning in his grave. But the area voted for leave and that’s made a lot of people lean towards Boris Johnson and the Tories. Brexit has polarised people.”