Jeremy Corbyn's campaign chiefs at Labour HQ micro-targeted the leader and his aides with Facebook ads at the last election because they didn't agree with some of his left wing messages.

The explosive claims were revealed in a new book — Ctrl Alt Delete: How Politics and the Media Crashed Our Democracy — by Tom Baldwin, who was Ed Miliband's chief of communications.

He said: 'Corbyn's aides sometimes demanded big spending on Facebook advertising for pet projects which Southsiders [officials at Labour HQ] regarded as a waste of money'.

Jeremy Corbyn (pictured speaking at the 134th Durham Miners Gala) was targeted by the ads

Campaign bosses managed to convince the Labour leader they were doing what he wanted by spending £5,000 on the ads designed to be seen by Corbyn and his advisers, but that others couldn't see, as reported by The Sunday Times

An official explained, 'if it was there for them, they thought it must be there for everyone. It wasn't. That's how targeted ads can work.'

A Labour source told the Sunday Times: 'Despite fighting with one hand tied behind our backs by some uncooperative senior staff, we achieved the largest increase in the Labour vote since 1945.'

Tom Baldwin (pictured at Labour Conference) was previously Ed Miliband's spin doctor and has released a new book called Ctrl Alt Delete: How Politics and the Media Crashed Our Democracy

The claims will likely shock Jeremy Corbyn who spent part of his weekend at the 100,000 person rally in London protesting against Donald Trump's four day UK visit.

The Labour leader told crowds that the PM should not have 'rolled out the red carpet' for the US president after his treatment of immigrants and jibes about the NHS and crime levels.

In his book Baldwin also argues political ads should be banned from social media.

Jeremy Corbyn taking part in the protest against Donald Trump in London. He told the crowd the PM should not have 'rolled out the red carpet' for the US President

He said: 'When the leader of a political party can be tricked in such fashion by his own officials, voters themselves stand little chance.'

The book also claims Hillary Clinton used 66,000 different Facebook ads during the US presidential election.

Facebook's targeted ad platform is a useful tool for political parties as it means they can pinpoint specific groups with messages.