Image caption In the Wizard of Oz the song celebrates the demise of the character of the Wicked Witch of the East

Ding Dong! The Witch Is Dead has failed to reach the number one spot in the music charts.

The Wizard of Oz song, which has been at the centre of an online campaign by opponents of Baroness Thatcher, reached number two after selling 52,605 copies.

However it was still more than 5,700 copies behind Duke Dumont and A*M*E with Need U (100%) which remained at the top for a second week.

Rival campaign song I'm In Love With Margaret Thatcher entered at 35.

The 1979 song by punk band Notsensibles sold 8,768 copies after a late push from Lady Thatcher fans.

The Official Charts Company said Ding Dong! The Witch Is Dead was "one of the most controversial chart contenders of all time" following the death of Lady Thatcher last week.

On Friday Radio 1 controller Ben Cooper said in his BBC blog he had decided Sunday's Official Chart Show would not play the 51-second song in full.

He said the decision had been a "difficult compromise", saying he had to balance respect for someone who had just died with issues around freedom of speech.

Media playback is unsupported on your device Media caption Newsbeat’s report explaining why the song entered the chart

Instead, host Jameela Jamil linked to a Newsbeat reporter who explained why the song was in the chart.

Two short clips of the song were played as Sinead Garvan gave details of the online campaign and explained why opponents had been critical of Lady Thatcher.

The news report - which ran for almost 40 seconds longer than the song itself - also included two views from members of the public on the controversy, with one saying it was "quite funny", while the other said it was "disgraceful".

The Notsensibles track was played in full on the programme, although Jamil did not introduce the song. The band was later mentioned as a new entry in the chart recap for songs 40 to 31, however the title was not named.

Cabinet Office Minister Francis Maude, who is overseeing Lady Thatcher's funeral arrangements, described the campaign to get Ding Dong! The Witch Is Dead to the top of the charts as "extremely trivial".

"I just think that doing it in the wake of an old lady's death doesn't reflect terribly well on us," he told BBC Radio 5 live's Pienaar's Politics.

Aside from the controversy, Ding Dong! The Witch Is Dead has become the first sub-60 second single to ever make the top 10.

The song charted at number nine on the Big Top 40 chart, broadcast on commercial radio stations.

Like Radio 1, the programme featured a short clip as part of a news report explaining the chart entry.

Elsewhere in the official singles chart, Pink's Just Give Me A Reason featuring Fun's Nate Ruess went down a place to number three, with Pompeii by Bastille at four and Feel This Moment by Pitbull featuring Christina Aguilera climbing three places to five.

In the album chart Paramore's self-titled fourth album ended Justin Timberlake's three-week stint at number one, outselling it by two copies to one.

Pink's The Truth About Love was at three, while Emeli Sande's Our Version Of Events climbed three places to number four. The album has now spent 61 weeks in the top 10.