When Banksy offered one of his highly sought-after canvases to Labour to auction for Ken Livingstone's ill-fated re-election campaign, the party's high command was jubilant.
They were left with a conundrum, however, when they realised that the secret identity of the famously elusive graffiti artist would cost their hard-pressed coffers tens of thousands of pounds.
The winning bid for Sketch for Essex Road, a canvas of two children with hands on hearts pledging allegiance to a Tesco carrier bag on a flagpole, was £195,000. But that meant Banksy's painting would have to be declared as a gift to the party, requiring it to release his true identity on the internet along with hundreds of other donors – blowing apart his well-guarded anonymity.
Electoral funding rules ban anonymous donations of more than £200.
In order to protect Banksy's anonymity, Labour accepted just £120,000 for the work – writing off the much-needed £75,000 difference which was inadmissable as this is what the work was deemed to be worth on the open market.
The winning bidder was the gallery owner Steve Lazarides, who deals in Banksy's work and his name appears on the electoral register of donations.
The saga started in March when the Aquarium Gallery in Farringdon, London, hosted a high-profile art auction to raise more than £230,000 for the former mayor's re-election campaign. The Banksy canvas was the star lot among the works donated by artists including Marc Quinn and Antony Gormley.
It was the final work to go under the hammer and attracted frenzied bidding, leaping quickly to £100,000 and beyond. Mr Livingstone said he was "completely light headed" when the bidding approached £200,000.
With Labour more than £17m in the red, officials were delighted at a rare piece of positive news. But they realised belatedly that they could not accept the full sum for Banksy's work.
To add insult to Labour's financial loss, the Mail on Sunday claimed last month to have at last unmasked Banksy as a 34-year-old "nice middle-class" former private school pupil called Robin Gunningham. The artist has repeatedly declined to deny the report.
One Labour source said: "This has certainly been more complicated than running a raffle. This has all been done in discussion with the Electoral Commission. At the end of the day, we did raise £120,000."
A Labour spokesman said the party was "satisfied that all our donations fully comply with the law", adding: "Obviously we carry out diligent checks on all donations and take care that we are fully compliant with the law. We are grateful to all our donors for their kind support."
The Electoral Commission said it could not comment on discussions with political parties. A spokeswoman for Banksy also declined to comment.