Prime Minister David Cameron on Thursday became the highest-ranking British politician to appear before a media ethics inquiry triggered by a phone-hacking scandal at Rupert Murdoch’s News Corp.

In early testimony, Cameron flatly denied suggestions that there was a plot or “nods or winks” between his Conservative Party and News International, the British arm of News Corp.

“Of course I wanted to win over newspapers,” Cameron said Thursday, referring to his media strategy in his successful 2010 election campaign. “I worked very hard at that because I wanted to communicate what the Conservative Party and my leadership could bring to the country.”

“But I didn’t do it on the basis of saying that either overtly or covertly your support will mean that I will give you a better time on this policy or that policy,” he said.

Cameron’s day-long testimony followed evidence recently given by several senior politicians, including three former British prime ministers.

Since the inquiry began hearing testimony in November, an impression has emerged of senior politicians attempting to curry favor with the Murdoch empire, which was perceived to have sway over national elections.

For his part, Cameron has faced criticism over his government’s handling of News Corp.’s attempt to take over British Sky Broadcasting (BSkyB), a lucrative satellite television company. The opposition Labor Party has argued that the Conservatives helped smooth the way for the bid in exchange for favorable coverage in Murdoch newspapers.

Much is at stake for Cameron, 45, whose party has been battered by a string of perceived mishaps and trails by about 10 percentage points in national polls.

“There’s a sense of privileged entitlement which is coming out more and more strongly and doesn’t do the government any good,” said Rodney Barker, professor emeritus of government at the London School of Economics. “Cameron’s image as a dreamy but basically nice guy is definitely getting rubbed, worn and tarnished.”

At times during the morning testimony, Cameron appeared uncomfortable, offering terse answers and often saying he could not recall particular meetings.

The hashtag #camnesia soon appeared on Twitter.

The media ethics probe — known as the Leveson Inquiry because of the presiding judge, Brian Leveson — was set up by a reluctant Cameron last summer at the peak of the phone-hacking scandal that enveloped News of the World, a 168-year-old tabloid. Revelations that employees had bribed police and tapped the phones of celebrities, politicians, royal family members and even ordinary Britons in pursuit of juicy stories prompted Murdoch to close the paper.

Before phone hacking erupted into a full-blown scandal last year, politicians here openly courted the press, especially News International, Britain’s biggest newspaper publisher, whose stable of papers includes the Times, the Sunday Times, and the Sun.

A year after becoming Labor Party leader, for instance, Tony Blair flew to Australia in 1995 to address Murdoch executives. News International subsequently switched its support to him, and Blair’s party won a landslide victory in 1997.

On Thursday, Robert Jay, the lead lawyer for the inquiry, painted a picture of a cozy relationship between Cameron and Rebekah Brooks, the former chief executive of News International, and her husband Charlie, a horse trainer.

Illustrating their closeness, Jay revealed a text message that Rebekah Brooks sent to Cameron on Oct. 7, 2009, the day before he addressed the Conservative Party conference. She ended the text message saying: “I am so rooting for you tomorrow not just as a personal friend but because professionally we’re definitely in this together. Speech of your life? Yes he Cam!”

Cameron told the inquiry that his relationship with Rebekah Brooks deepened after she moved in with Charlie, a life-long friend of his who lives a few miles away from Cameron’s constituency home just outside Chipping Norton, a picturesque village near Oxford.

Brooks has previously told the inquiry that Cameron used to sign his text messages to her with “LOL,” until she told him the acronym didn’t mean “lots of love,” but rather “laugh out loud.”

Brooks and her husband were granted bail Wednesday after appearing in a central London court. They face charges of perverting the course of justice in one of the many police investigations related to the phone hacking.

Cameron also defended his decision to hire Andy Coulson as his director of communications a few months after Coulson resigned as editor of News of the World.

Coulson left the paper after its royal editor and a private investigator were briefly jailed in 2007. But he has always denied any personal wrongdoing or knowledge of phone hacking at the paper. He was recently charged with perjury.

Cameron said he was impressed by Coulson’s ability and admitted that his vast network of contacts with News International “weren’t irrelevant” in considering him for the job. He also emphasized that he received assurances that Coulson was not involved in phone hacking.

He said Coulson did a good job as his communications chief but conceded that his controversial decision to hire him “has come back to haunt both him and me.”