Labour candidate John O'Farrell has said he will not stand in the 2015 General Election, in part because of the vilification he received from tabloids for comments about Margaret Thatcher's death he made in his autobiography.

Writing in the Guardian, the former satirist said he wanted to stand originally to "help the party avoid disappearing completely in a Swiftian battle between two coalition parties fighting tooth and nail to vote for identical policies."

john ofarrell

Labour's John O'Farrell campaigning in Eastleigh

"And for a second I fantasised that if enough disgruntled Liberal Democrats switched to Labour and a protest bandwagon began to roll, then maybe we could actually win it."

His decision not to stand was met with sadness from many Labour colleagues.

The controversy first arose when the Daily Mail ran a series of pieces on O'Farrell, including one entitled "Is Ed's mate the sickest man in politics?".

They were referring to a 1998 book, Things Can Only Get Better, where O'Farrell wrote that he felt a fleeting sense of disappointment that Margaret Thatcher had not been killed in a 1984 IRA bombing. Five people died in the attack on the Grand Hotel in Brighton.

Prime Minister David Cameron called John O'Farrell's comments "a complete disgrace" during Prime Minister's Questions.

O'Farrell defended himself on Twitter, posting: "I wrote an honest memoir and volunteered this fleeting bad thought from 1984 to illustrate how hatred can poison politics."

Labour came fourth in the Eastleigh by-election on Thursday, which was won by Lib Dem Mike Thornton, his party also beaten by the Tories and Ukip.

In the blog, published on Friday night, O'Farrell accused Tory whips of "planting questions about me for David Cameron and abusing their parliamentary privilege to say I supported terrorism."

"When the local paper cut and pasted the Mail article onto their front page (without I might add, giving me the opportunity to comment), I learned that I had made a classic byelection gaffe of being personally responsible for every death caused by the IRA since 1921," he joked.

"I don't doubt that constantly having to repeat that I never supported terrorism damaged me. And I worry about the Facebook generation going into politics, when every sick one-liner or embarrassing photo will be there in the archive for smears in later life."

Dismissing rumours that he would be rewarded with a safe seat for Labour in 2015, O'Farrell said he had decided not to run. "I think I can be more effective with the freedoms that not being a traditional politician provides."

WATCH: Hutchings' Bizarre Exit From Eastleigh Count

SEE ALSO: Crisis For Cameron As Ukip Beat Tories And Lib Dems Win

Nigel Farage: 'One More Week And Ukip Would Have Won Eastleigh'

Conservative Vice Chair Michael Fabricant Attacks Tory Voice 'Muffled Not Crisp'

SPINNING AROUND: Conservatives Spin Loss As Victory For Coalition

Loading Slideshow...
  • Eastleigh by-election

    The Liberal Democrat candidate Mike Thornton celebrates (left) after the declaration at Fleming Park in Eastleigh, Hampshire where he won the by-election. Left to right: Mike Thornton, Lib Dem, John O'Farrell, Labour, Danny Stupple, Independent and Diane James, UKIP.

  • Eastleigh by-election

    The Monster Raving Loony Party candidate congratulates the Liberal Democrat candidate Mike Thornton and his wife Peta as they arrive to hear the declaration at Fleming Park in Eastleigh, Hampshire where it was expected Thornton will be announced the winner of the by-election.

  • Liberal Democrats Hold On In Eastleigh; UKIP Tops Conservatives

    EASTLEIGH, HAMPSHIRE - MARCH 01: Liberal Democrat candidate Mike Thornton celebrates his win with party leader Nick Clegg at the Hampshire Cricket County on March 1, 2013 in Eastleigh, Hampshire. The Liberal Democrat party managed to retain the seat of ex-Liberal Democrat MP Chris Huhne however UKIP managed to beat the Conservatives to second place. (Photo by Matt Cardy/Getty Images)

  • Liberal Democrats Hold On In Eastleigh; UKIP Tops Conservatives

    EASTLEIGH, HAMPSHIRE - MARCH 01: Liberal Democrat candidate Mike Thornton celebrates his win with party leader Nick Clegg at the Hampshire Cricket County on March 1, 2013 in Eastleigh, Hampshire. The Liberal Democrat party managed to retain the seat of ex-Liberal Democrat MP Chris Huhne however UKIP managed to beat the Conservatives to second place. (Photo by Matt Cardy/Getty Images)

  • Liberal Democrats Hold On In Eastleigh; UKIP Tops Conservatives

    EASTLEIGH, HAMPSHIRE - MARCH 01: Liberal Democrat candidate Mike Thornton celebrates his win with party leader Nick Clegg at the Hampshire Cricket County on March 1, 2013 in Eastleigh, Hampshire. The Liberal Democrat party managed to retain the seat of ex-Liberal Democrat MP Chris Huhne however UKIP managed to beat the Conservatives to second place. (Photo by Matt Cardy/Getty Images)

  • Liberal Democrats Hold On In Eastleigh; UKIP Tops Conservatives

    EASTLEIGH, HAMPSHIRE - MARCH 01: Liberal Democrat candidate Mike Thornton celebrates his win with party leader Nick Clegg at the Hampshire Cricket County on March 1, 2013 in Eastleigh, Hampshire. The Liberal Democrat party managed to retain the seat of ex-Liberal Democrat MP Chris Huhne however UKIP managed to beat the Conservatives to second place. (Photo by Matt Cardy/Getty Images)

  • Liberal Democrats Hold On In Eastleigh; UKIP Tops Conservatives

    EASTLEIGH, HAMPSHIRE - MARCH 01: Liberal Democrat candidate Mike Thornton celebrates his win with party leader Nick Clegg at the Hampshire Cricket County on March 1, 2013 in Eastleigh, Hampshire. The Liberal Democrat party managed to retain the seat of ex-Liberal Democrat MP Chris Huhne however UKIP managed to beat the Conservatives to second place. (Photo by Matt Cardy/Getty Images)

  • Eastleigh by-election

    Diane James, the UKIP candidate with Mike Thornton after beating the Conservative party candidate Maria Hutchings into third place in the by-election at Fleming Park in Eastleigh, Hampshire.

  • Eastleigh by-election

    Diane James, the UKIP candidate celebrates after beating the Conservative party candidate Maria Hutchings into third place in the by-election at Fleming Park in Eastleigh, Hampshire. Left to right: Mike Thornton, Lib Dem, John O'Farrell, Labour and Danny Stupple, Independent.

  • Eastleigh by-election

    The Conservative party candidate Maria Hutchings leaves the count at Fleming Park in Eastleigh, Hampshire without making a coment after caming third after the Lib Dems and UKIP in the by-election.

  • Eastleigh by-election

    The Liberal Democrat candidate Mike Thornton celebrates with his wife Peta after the declaration at Fleming Park in Eastleigh, Hampshire where he won the by-election.

  • Eastleigh by-election

    The Conservative party candidate Maria Hutchings at Fleming Park in Eastleigh, Hampshire where she came third after the Lib Dems and UKIP in the by-election.

  • Eastleigh by-election

    Prime Minister David Cameron and Conservative candidate Maria Hutchings leaflet drop residential homes, before the imminent by-election in Eastleigh, Hampshire. The by-election has been called as its former MP, Chris Huhne, resigned after pleading guilty to perverting the course of justice over claims his ex-wife took speeding points for him in 2003.

  • Eastleigh by-election

    Chancellor George Osborne wears a high visibility jacket as he makes a visit to the Prysmian Group factory and speaks to (L- R) employee Raj Guru, factory manager Steve Price, CEO Paul Atkinson and Conservative candidate Maria Hutchings in the constituency of Eastleigh, Hampshire. The Conservative party minister visit to the energy and telecom cable maker was to meet the party's candidate Hutchings ahead of the Eastleigh by-election on February 28 to elect a new MP, after Chris Huhne was forced to resign.

  • Eastleigh by-election

    The Liberal Democrat candidate Mike Thornton kisses his wife Peta as they arrive to hear the expected declaration at Fleming Park in Eastleigh, Hampshire where it was expected he will be announced the winner of the by-election.

  • Eastleigh by-election

    The Liberal Democrat candidate Mike Thornton and his wife Peta arrive to hear the expected declaration at Fleming Park in Eastleigh, Hampshire where it was expected he will be announced the winner of the by-election.

  • Eastleigh by-election

    The Liberal Democrat candidate Mike Thornton and his wife Peta arrive to hear the declaration at Fleming Park in Eastleigh, Hampshire where it was expected he will be announced the winner of the by-election.

  • Eastleigh by-election

    The Liberal Democrat candidate Mike Thornton celebrates with his wife Peta (centre) and family after the declaration at Fleming Park in Eastleigh, Hampshire where he won the by-election.

  • Eastleigh by-election

    The Liberal Democrat candidate Mike Thornton hugs his wife Peta as they arrive to hear the declaration at Fleming Park in Eastleigh, Hampshire where it was expected he will be announced the winner of the by-election.

  • Eastleigh by-election

    The Monster Raving Loony Party candidate congratulates the Liberal Democrat candidate Mike Thornton and his wife Peta as they arrive to hear the declaration at Fleming Park in Eastleigh, Hampshire where it was expected Thornton will be announced the winner of the by-election.

  • Eastleigh by-election

    The Liberal Democrat candidate Mike Thornton and his wife Peta arrive to hear the declaration at Fleming Park in Eastleigh, Hampshire where it was expected he will be announced the winner of the by-election.

  • Liberal Democrats Hold On In Eastleigh; UKIP Tops Conservatives

    EASTLEIGH, HAMPSHIRE - MARCH 01: Liberal Democrat candidate Mike Thornton celebrates his win with party leader Nick Clegg at the Hampshire Cricket County on March 1, 2013 in Eastleigh, Hampshire. The Liberal Democrat party managed to retain the seat of ex-Liberal Democrat MP Chris Huhne however UKIP managed to beat the Conservatives to second place. (Photo by Matt Cardy/Getty Images)

  • Eastleigh by-election

    The Liberal Democrat candidate Mike Thornton celebrates (left) after the declaration at Fleming Park in Eastleigh, Hampshire where he won the by-election. Left to right: Mike Thornton, Lib Dem, John O'Farrell, Labour, Danny Stupple, Independent and Diane James, UKIP.

  • Eastleigh by-election

    The first ballot boxes arrive for counting at Fleming Park in Eastleigh, Hampshire where the by-election was held today.

  • Eastleigh by-election

    Conservative supporters share a packet of mints while waiting for the declaration at Fleming Park in Eastleigh, Hampshire where the by-election was held today.

  • Eastleigh by-election

    The first ballot boxes arrive for counting at Fleming Park in Eastleigh, Hampshire where the by-election was held today.

  • Eastleigh by-election

    The first ballot boxes arrive for counting at Fleming Park in Eastleigh, Hampshire where the by-election was held today.

  • Eastleigh by-election

    Labour leader Ed Miliband speaks to former Liberal Democrat voters during his visit Eastleigh in Hampshire where he met prospective parliamentary candidate John O' Farrell (right) during the by-election campaign.

  • Eastleigh by-election

    A general view of the ballot papers being counted at Fleming Park in Eastleigh, Hampshire where the by-election was held today.

  • Eastleigh by-election

    The first ballot boxes arrive for counting at Fleming Park in Eastleigh, Hampshire where the by-election was held today.

  • Eastleigh by-election

    A general view of the ballot papers being counted at Fleming Park in Eastleigh, Hampshire where the by-election was held today.

  • Eastleigh by-election

    The first ballot boxes arrive for counting at Fleming Park in Eastleigh, Hampshire where the by-election was held today.

  • Eastleigh by-election

    The first ballot boxes arrive for counting at Fleming Park in Eastleigh, Hampshire where the by-election was held today.

  • Eastleigh by-election

    The first ballot boxes arrive for counting at Fleming Park in Eastleigh, Hampshire where the by-election was held today.

  • Eastleigh by-election

    The first ballot boxes arrive for counting at Fleming Park in Eastleigh, Hampshire where a by-election was held today.

  • Eastleigh by-election

    The first ballot boxes arrive for counting at Fleming Park in Eastleigh, Hampshire where a by-election was held today.

  • Eastleigh by-election

    The first ballot boxes arrive for counting at Fleming Park in Eastleigh, Hampshire where a by-election was held today.

  • Eastleigh by-election

    The first ballot boxes arrive for counting at Fleming Park in Eastleigh, Hampshire where a by-election was held today.