How did David Cameron, a man until recently regarded by Rupert Murdoch as a "lightweight", convince one of the media mogul's most cherished papers, the Sun, to support him?
Initially the News Corporation head, fond of the days when Margaret Thatcher's cabinet contained "more old Estonians than Old Etonians", was highly sceptical of the upper-class Cameron.
Appearing on The Charlie Rose Show in July 2006, Murdoch was asked, "What do you think of David Cameron?" His contemptuous reply was: "Not much." Conversely, he was highly impressed by Gordon Brown and admired his intellect, his work ethic and his Presbyterian conscience.
As Michael Wolff, the author of the Murdoch biography The Man Who Owns the News, noted during this period: "Murdoch continues to like Gordon Brown -- he might be the Labour Prime Minister, but he's conservative, particularly in the Murdoch sense of no pretence, no frills."
So what changed? The most obvious answer is Cameron's poll ratings. Murdoch may present himself as a contrarian who relishes every opportunity to defy "the establishment" but politically he has always followed rather than led public opinion.
Then there's the BBC. As I first noted in the aftermath of James Murdoch's broadside against the corporation, the family has become increasingly obsessed with curtailing the BBC's "chilling" expansion.
Under Cameron's leadership, the Tories have already demonstrated their willingness to challenge the successive licence-fee increases the world's largest broadcaster has enjoyed under Labour. In May, parliament voted on a Tory proposal to freeze the licence fee, with Cameron arguing that during the recession the BBC needed to do "more with less".
The proposal made little political impact and was easily defeated by 334-156 votes, but it set an important precedent.
Even more significant is Cameron's pledge to abolish Ofcom. On 26 July the media regulator announced that it would force the Murdoch-owned BSkyB to cap the cost of its premium sports and film channels, potentially making them available on new platforms such as BT Vision. Sky retaliated by promising to use all legal avenues available to challenge the ruling.
Just ten days later, in a surprise speech, Cameron promised that, under a Conservative government, "Ofcom as we know it will cease to exist".
Finally, it is clear that it was James Murdoch, who oversees the European and Asian corners of his father's empire, who pushed hardest for the declaration in favour of Cameron. Lord Mandelson may not have been far from the truth when he claimed last night that Murdoch Sr "was a little surprised and disappointed" by the decision.
As Wolff wrote in 2008: "[T]hen there is James's infatuation with David Cameron, the Tories' cool, glam former PR guy, whom Murdoch knew he was, however begrudgingly, going to have to accept."
It's no coincidence that the Sun's endorsement of Cameron was notably more qualified than its declaration for Blair. The Conservative leader is likely to have to offer further guarantees to keep the paper onside.