Adam Smith, advisor to culture secretary Jeremy Hunt, was drawn into "a web of manipulation and exaggeration" over the News corporation BSkyB bid, according to a senior civil servant.
Smith resigned after the Leveson inquiry into press ethics revealed hundreds of emails and text messages between him and News Corp's public affairs director Fred Michel.
Jonathan Stephens, permanent secretary for the department of Culture, Media and Sport told the inquiry that he recommended Smith's dismissal to Hunt after the level of contact was revealed.
He said: "I said to the culture secretary that I thought that the nature, content, extent and depth of the contact suggested by the emails revealed the previous day meant that this was far beyond what could be considered appropriate."
He said Smith had shared a degree of contact with the company that "hugely shocked" him and was beyond defensible.
Lord Justice Leveson asked Stephens how Smith could be allowed to get so close to the company and thus risk questions being raised over Hunt's impartiality as a quasi-judicial arbiter of the bid.
Stephens replied: "I had a very high regard for him [Smith]. We worked very closely with him and very successfully for over two years or so and it's a matter of immense regret to me that this happened.
"I personally believe that, against his will and intentions, [Smith] was drawn into a what seems almost to be a web of manipulation and exaggeration and he was inadvertently drawn beyond what he intended to do or wanted to do."
Smith, who gave evidence earlier in the day, told the inquiry how Michel would barrage him with emails and texts, bringing him "to the end of my tether".
He also revealed that he offered his resignation to Hunt soon after the emails were received, only to be told "it won't come to that".
This morning prime minister David Cameron appeared on ITV's Daybreak to support the aoppointment of Hunt as arbiter despite having been aware of his personal opinion in favour of the News Corp bid.
He said: "The key thing was it wasn't what [Hunt] said in the past, it was how he was going to do the job. And I think, if you look at how he did the job, he asked for independent advice at every stage and he took that independent advice and he did it in a thoroughly proper way."
Hunt will give evidence to the inquiry next week.