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."
We're pleased the song failed to make the top spot, regardless of one's opinion on Baroness Thatcher those getting excited about her death should be ashamed of themselves. Here lies a woman that did not ruin Britain; and those jumping on the band-wagon were either not born or were not old enough to understand politics at the time of her reign as the first and only female Prime Minister of the UK. She is also a Mother, Grandmother, Sister and friend of many; those people and indeed Baroness Thatcher herself deserve repect.