To gauge the views of a serious newspaper, read the editorials. To gauge those of a tabloid, read the news page headlines. So consider these recent headlines in the Sun: Ukip boss slams new press law; Lib Dems fall behind Ukip; PM feels heat from Tories as rival's support hits 38%. The paper's acceptance of Ukip as a political force to be reckoned with goes back to the end of last year: Ukip "set for surge and poll triumph"; Ukip "is third party"; Ukip soars to its highest poll rating after fostering scandal.

The effect of these headlines and stories is to bring Ukip from the fringe into the mainstream, to legitimise it as a serious political contender. The Sun is urging its readers not to see it as a marginal party that the prime minister, David Cameron, once ridiculed as full of "fruitcakes, loonies and closet racists". Consider also the cautious enthusiasm of the paper's political sage, associate editor Trevor Kavanagh. He compared the party favourably as against the coalition leadership in a piece headlined "Ukip are not as odd as the Odd Couple."

Headlines apart, there is an even clearer pointer to the paper's political sympathies by noting who dines with the paper's boss, Rupert Murdoch. Step forward Ukip leader Nigel Farage. After they shared a supper earlier this month, Farage emerged to describe the News Corp chairman as a "remarkable bloke". He gave no details about the nature of their discussion, but it was noticeable that their meeting, the first between them, occurred five days after Ukip won second place in the Eastleigh byelection ahead of the Conservatives.

That result was greeted by the Sun's political editor, Tom Newton Dunn, as a "phenomenal performance" which sounded "a major alarm bell for Westminster's old guard". Murdoch clearly agreed, giving a giant clue to his sympathies on Twitter with a tweet saying "Farage reflecting opinion". In other words, reflecting Murdoch's, and the Sun's, opinion.

Ukip exists for one reason: to remove Britain from the European Union. And that has long been Murdoch's desire too. The reasons for his extreme hostility to the EU are unclear, but they certainly play well with the Sun's audience. Indeed, there is an obvious reciprocity between the Sun's anti-European agenda and the readership's negative feelings about the EU. They feed off each other. On this single issue, there is almost no difference between Murdoch and Farage.

There is a way to go before the Sun needs to reveal who it will support in the 2015 general election. But it is inconceivable that Murdoch will support Ed Miliband's Labour party. Nor, of course, will he go for Nick Clegg's Lib Dems.

As for Cameron, Murdoch has never been enthusiastic, and it has become increasingly clear that he has been unimpressed by his Downing Street tenure so far. The press regulation dramas have surely added to his dislike for the prime minister.

So the Ukip option remains a possibility. After all, the Sun has never been attached to any party. Since Murdoch acquired the paper in 1969, it has switched several times between Labour and the Conservatives.

It has also proved itself utterly pragmatic by backing other parties in the editions serving other countries. Its Scottish edition supported the SNP. In the last Irish general election it favoured Fine Gael.

If Murdoch were to order Britain's bestselling paper to back Ukip, it could well have a destabilising effect on the Tory vote and help Labour to victory. Doubtless, that would stay his hand.

That apart, Farage must also realise that there is another maverick contender for Murdoch's hand: Boris Johnson. If Johnson were leader, the Sun's master would surely get right behind him. Then again, perhaps Farage would do the same.