Welsh Labour will try to distance itself from the national party during the general election campaign after it did better than activists and experts anticipated in the local elections.

While Welsh Labour was upset at losing out in constituencies with strong historical ties to the party such as Merthyr Tydfil and Blaenau Gwent, it held on to power in Newport, Swansea and Cardiff.

When it launches its general election campaign next week its branding and slogans will make it clear it has its own identity.

Strategists believe the Welsh Labour leader and first minister, Carwyn Jones, is playing well on the doorstep and – during the council elections at least – has helped counter any potential negative impact from Jeremy Corbyn.

On Friday, Jones told supporters: “Welsh Labour candidates and activists can be incredibly proud of themselves today – they fought another tough election, and once again defied the odds. The Tories had been briefing that they’d be walking into power right across Wales – that simply has not happened.”

Jones accepted it was a “mixed night” for Labour, but added: “We must now re-focus and fight a general election campaign the same way we always fight elections – with our own Welsh Labour values, huge amounts of hard work and an absolute commitment to stand up for our communities against the Tories.”

In Cardiff North – a bellwether general election seat – Labour’s success in clinging on to power, albeit with a reduced majority, was greeted joyfully by activists and supporters.

Keith Morgan, a retired social services manager, said he had been gloomy about Labour’s prospects across the UK because of the Corbyn effect. “But the result here gives cause for optimism,” he said.

Morgan said he regrets voting for Corbyn when he first stood for leadership. “I did that because I thought his views needed a voice. But he is not a leader, he’s a backbencher,” he said.

Kate Bennett and her daughter Alice Macintosh, both Labour supporters, went to see Corbyn speak on Whitchurch Common in the first week of the general election campaign. “He spoke well,” said Bennett. “I do have some time for him. These local elections have given us a real boost.”

Bennett pointed out that Labour’s losses in the valleys had tended to be at the hands of independents rather than Tories. She was delighted that Ukip, which won seven seats at last year’s assembly election, had collapsed. “That is a huge relief,” she said.

Cllr Phil Bale, the Labour leader in Cardiff, hung on to his seat in the north of the Welsh capital despite predictions he could become the most high-profile victim of this round of local elections.

He admitted it had been tough. “As soon as the general election was called it changed the dynamic of the campaign,” he said. “It’s very hard to get people to focus on local issues and yet we’re talking about some of the most important services people rely on.”

None of the parties will have been wholly happy with the results in Wales. There was no runaway success for the Tories while Plaid Cymru made small gains, and the Lib Dems had little to cheer.

In truth, the Labour losses in Merthyr and Blaenau were not seismic shocks. Both councils were run by independents until Labour’s huge local council election success of 2012. Perhaps more worrying for Labour was the loss of overall control in Bridgend, the first minister’s backyard and the scene for Theresa May’s visit last week, which was seen as showing that the Tories were chasing traditional Labour seats as well as marginal constituencies.

Labour accepts it still has a mountain to climb but appears prepared for the fight. When Jones tweeted the ousted Merthyr leader, Brendan Toomey, expressing his commiserations, the defeated councillor replied: “Thanks Boss, I’m not going anywhere, I’m here to do anything I can in any capacity for @welshlabour.”