British Culture Secretary Jeremy Hunt sent News Corp. executive James Murdoch a congratulatory text message about a takeover bid by the media conglomerate on the same day that Hunt was handed responsibility for approving the bid, a media ethics inquiry heard Thursday.

During highly anticipated testimony by Hunt, a senior government minister in charge of this summer’s London Olympics, e-mails and text messages were disclosed showing his support for News Corp.’s $12 billion takeover bid of British Sky Broadcasting (BSkyB), a lucrative satellite broadcaster.

The bid was withdrawn at the peak of a phone-hacking scandal that continues to engulf Rupert Murdoch’s News Corp., the world’s second-largest media conglomerate. James Murdoch, 39, the media mogul’s youngest son, serves as deputy chief operating officer of News Corp. He resigned this year as chairman of the company’s British newspaper division in the wake of the scandal, in which tabloid employees were accused of tapping telephones, bribing police and other transgressions in pursuit of juicy stories.

The handling of the BSkyB bid has emerged as a key factor in the long-running inquiry that is shining a light on the links between the media and politicians. Critics have accused the Conservative government of backing the BSkyB takeover in exchange for favorable coverage in the Murdoch press.

Hunt, in particular, has been fighting for his job since April, when an aide resigned after the disclosure of e-mails that suggested Hunt’s office had inappropriate contact with News Corp.

Prime Minister David Cameron also has come under question for giving Hunt the responsibility for the bid. But after watching Thursday’s testimony, Cameron continued to back Hunt, who holds the post of secretary of state for culture, Olympics, media and sport.

Hunt “acted properly” and “took independent advice at every turn, as well as a number of decisions which were against News Corporation’s wishes,” said a spokeswoman from Cameron’s office.

In his quasi-judicial role, Hunt was tasked with making an impartial decision on whether News Corp.’s bid violated Britain’s anti-monopoly rules.

Hunt admitted that he had been publicly “sympathetic” to the bid, but he insisted that once in charge, he set his sympathies aside and acted scrupulously and fairly.

Hours before he was appointed to the role, and on the same day that the European Commission in Brussels approved the takeover bid on competition grounds, Hunt texted James Murdoch: “Great and congrats on Brussels, just Ofcom to go!” Ofcom is Britain’s media regulator.

Later that day, Vince Cable, the business secretary in Cameron’s cabinet, was stripped of his responsibility for handling the bid. The move followed a sting operation by undercover Daily Telegraph reporters, who secretly taped Cable saying that he had “declared war” on Rupert Murdoch.

At 4:08 p.m., Hunt texted Chancellor of the Exchequer George Osborne to express alarm over Cable’s comments, saying: “Cld we chat about Murdoch Sky bid? I am seriously worried we are going to screw this up.”

At 4:58 p.m., Osborne sent a text to Hunt, saying, “I hope you like the solution!” About an hour later, that solution was apparent: Hunt was given the responsibility for the bid.

Robert Jay, the inquiry’s lead lawyer, said that if Cable was stripped of his role because of the appearance of bias in one direction, it followed that, for similar reasons, Hunt should never have been given the role. A month before Hunt was put in charge of the bid, for instance, he wrote Cameron an e-mail that said it would be a mistake for the government to “cave” in to News Corp.’s opponents.

Hunt disagreed with Jay, arguing that the point of the role was not to approach it “with your brain wiped clean.” Rather, he said, “the point about a quasi-judicial role is that you set aside any views that you have.”

In one of the lighter moments of the testimony, Hunt was quizzed about a report by a Daily Telegraph columnist who said he saw the culture secretary hiding behind a tree en route to a dinner with James Murdoch in what appeared to be an attempt to avoid a gaggle of journalists.

It was “not a time to have an impromptu interview” with the journalists, Hunt said, so he “moved to a different part of the quadrangle.”

When asked about the tree, Hunt said: “There may or may not have been trees.”