Jeremy Corbyn is facing a so-called "soft coup" from media organisations owned by Rupert Murdoch and "elements" within the Labour Party, John McDonnell has sensationally claimed. The shadow chancellor warned Corbyn's supporters that the alleged plot is "planned, coordinated and fully resourced".

"The coup is not being waged up front in public but strictly behind the scenes," McDonnell wrote in Labour Briefing.

"Having learned the lesson of the last coup attempt – that a direct attack on Jeremy and his policies will provoke a backlash from many party members – the coup perpetrators are, this time round, pursuing a covert strategy.

The aim of these covert coup plotters is to undermine the support Jeremy has secured among Labour Party members, and also importantly to undermine support from Labour voters.

"Undermining support for Jeremy from Labour voters is important to the plotters because their objective is to ensure Jeremy trails in the polls and can't win elections. In this way they can destroy morale among party members and their confidence in him."

But a source at The Sun, Murdoch's daily tabloid, accused McDonnell of "barmy conspiracies" and urged McDonnell to "look at his role in Labour's sad collapse".

"Every media outlet, other than the Morning Star, has reported Labour's internal unrest over Corbyn's leadership and we have no shortage of material, as evidenced by 172 of Corbyn's own MPs registering a vote of no confidence in him last year," the source told IBTimes UK.

"Rather than dreaming up barmy conspiracies, perhaps John McDonnell should take a closer look at his role in Labour's sad collapse."

The shadow chancellor's article was published on 26 February, and just two days after Labour lost the West Cumbrian seat of Copeland to the Conservatives.

The last time a government party won a by-election seat off the opposition was in 1982, when Labour lost the London constituency of Mitcham and Morden to the Conservatives.

But Labour also fended off Ukip leader Paul Nuttall in a by-election to retain the Stoke-on-Trent Central seat in Staffordshire.

"Labour's victory in Stoke is a decisive rejection of Ukip's politics of division and dishonesty. But our message was not enough to win through in Copeland," Corbyn said.

"In both campaigns, Labour listened to thousands of voters on the doorstep. Both constituencies, like so many in Britain, have been let down by the political establishment.

"To win power to rebuild and transform Britain, Labour will go further to reconnect with voters, and break with the failed political consensus."

UPDATE: 11:32 GMT, 27 February

A spokesman for John McDonnell has released a statement.

"This article was written over a week ago in response to the intervention from Tony Blair. It was published in print last week and only went online last night. However, as John said yesterday he wants us all to focus on party unity following last week's by-election results. And he is looking to reach out in the coming days to those across all sections of the party and none."