A former Labour cabinet minister has accused his party’s leadership of carrying on regardless towards disaster after a “dreadful” result in the Brecon by-election.

Labour came fourth and was close to losing its deposit in the Welsh seat last week, prompting anger among the party’s politicians. Boris Johnson’s majority was cut to one as the Liberal Democrats won the Welsh seat.

In a leaked message posted in private WhatsApp group, Lord Hain, who served Tony Blair’s and Gordon Brown’s cabinets, said the result was “truly dreadful”.

Laying into the leadership, he wrote: “Nearly lost our deposit in Brecon by-election and, as some of us feared, came fourth. Truly dreadful result. At a similar point in the electoral cycle in 1985 under Neil Kinnock we nearly