Ding Dong The Witch Is Dead - the song propelled into the charts by opponents of Baroness Thatcher - has failed to reach the number one spot.
The recording, taken from 1939 film The Wizard of Oz, entered the charts at number two.
It was more than 5,000 sales short of this week's chart-topper Need U (100%) by Duke Dumont featuring A*M*E.
The Official Charts Company described Ding Dong The Witch Is Dead as "one of the most controversial chart contenders of all time".
Sales were fuelled by an online campaign organised by opponents of the former prime minister, who wanted to see the 51-second song reach number one.
It entered the charts at number 54 on Tuesday, the day after Baroness Thatcher's death, and climbed to number 10 on Wednesday. By Thursday, it had reached number four and was at number three by Friday.
There was a final rush of 18,000 sales between Friday morning and today, the Official Charts Company said, but its final total was 52,605 copies - 5,700 behind Duke Dumont, which achieved 58,321 sales in the past week.
An Official Charts Company spokeswoman said it had been a "relatively quiet" week for sales however, with the average sale of a number one in 2012 being just under 106,000 copies.
Some Tory MPs demanded the BBC ban the song - but others warned that politicians should not interfere in the choice of records played by broadcasters.
New BBC Director General Tony Hall has explained the broadcaster's decision to only play a five-second clip of the song as part of a news item during the Radio 1 chart show, saying: "I personally believe it is distasteful and inappropriate.
"However I do believe it would be wrong to ban the song outright as free speech is an important principle and a ban would only give it more publicity."
Radio 1 controller Ben Cooper agreed it was a "logical decision".
Despite failing to reach the top spot, Ding Dong The Witch Is Dead has broken a new record by becoming the shortest top 10 single of all time and is the only one in history to be under a minute long.
Punk song I'm In Love With Margaret Thatcher by the Notsensibles, which was featured in recent film The Iron Lady, also entered the top 40 today.
The 1979 single reached number 35 after a push from fans of Lady Thatcher in response to Ding Dong The Witch is Dead and sold 8,768 copies.
During the Radio 1 chart show, DJ Jameela Jamil said there was a "brand new entry at number two" before introducing Newsbeat music's reporter.
Sinead Garvan explained the context of the single's appearance in the charts to listeners of the station, which has a target audience of 15 to 29-year-olds.
She told them: "Tributes poured in from across the world for Margaret Thatcher when she died on Monday, but there were also people who threw street parties around the UK.
"An online campaign began in 2007 to try to get this song, Ding Dong The Witch Is Dead, to number one in the charts the week Lady Thatcher died."
A short segment of the song, featuring the lyrics: "Ding dong, the wicked witch is dead", was then played for a matter of seconds.
Ms Garvan then said Lady Thatcher had "strongly divided opinion", before listeners heard a brief instrumental section of the recording. The show also asked members of the public for their thoughts, with mixed opinions being aired.