Sir Paul Stephenson, the outgoing Metropolitan police commissioner, has told MPs he was advised by a senior Downing Street official not to risk "compromising" the prime minister by disclosing to him information related to the phone-hacking scandal.

Stephenson said he was unable to name the No 10 aide but that outgoing Met assistant commissioner, John Yates, who also resigned over the phone-hacking scandal, would know. Yates later told the same home affairs select committee that it was No 10 chief of staff Ed Llewellyn who turned down his offer to brief Downing Street on the "nuances" of the hacking investigation after the New York Times story in September 2010.

Facing MPs, the Met chief also insisted his decision to resign was "my decision and my decision alone" and rejected any suggestion the resignation statement that followed was intended as a "swipe" or a "personal attack" on the prime minister.

Stephenson said this was his last public engagement in the role of commissioner. He was recalled last week to reappear in front of Tuesday's home affairs select committee after it emerged that Neil Wallis, a former News of the World executive, arrested on Thursday by the police team investigating phone hacking, had been employed as an adviser to Scotland Yard's top officers last year.

He said he regretted the fact Wallis was hired by the Met. He added that he had not told the prime minister that Wallis worked for the Met as a PR consultant before the name of the former deputy editor of News of the World had become linked with phone hacking because he had "no reason to".

"I had no reason to connect Wallis with phone hacking, I had no reason to doubt his impropriety; nothing had come to my attention," he said.

"And I'd been given assurances by a senior grade chief constable that actually there was nothing new [in the phone-hacking case]. So I had no reason to disclose a very minor contract, that was very part-time, of someone working for my DPA (directorate of public affairs) and giving me occasional advice."

However, he said that once Wallis's name did come up, it seemed "eminently sensible not to impugn the character of the prime minister but to actually consider: Is it right to allow anyone to ask any questions later because I'd given him operational information that someone could suggest that, because of his relationship with Coulson and Coulson's relationship with Wallis, that somehow that could open up some charge of impropriety."

To the surprise of MPs, he added: "Actually a senior official at No 10 guided us that actually we should not compromise the prime minister, and it seems to me to be entirely sensible."

He added later he did not know that Cameron would be compromised by having been given phone-hacking information but that he wanted to protect him from possible allegations.

Asked who the Downing Street official was who warned him over compromising the PM, Stephenson said members of the panel should ask John Yates.

No 10 says it will look into the claims that a "senior adviser" in government advised the Met not to tell the prime minister about Neil Wallis's contract, although a spokesman added it was unlikely they would give out details.

Stephenson said he only found out that Wallis's daughter worked for the Met at the weekend. He had issued a carefully worded resignation speech on Sunday that some had interpreted as being aimed directly at Downing Street, by suggesting that the prime minister risked being "compromised" by his closeness to former News of the World editor Andy Coulson.

Stephenson was asked whether he believed Coulson and Wallis knew of each other's appointments by the prime minister and the Met police, respectively. "I'm sure if there's a close relationship between Mr Coulson and Mr Wallis, they would discuss it," he replied.

He also rejected speculation that Boris Johnson, the London mayor, forced him out by declaring that the Conservative mayor thought it was "wrong" that he quit.

Stephenson: Wallis did not give advice before Guardian meeting

Stephenson was also asked about a meeting he had with the Guardian in December 2009 to try to persuade the newspaper that its coverage of phone hacking was exaggerated and incorrect.

Asked whether he had looked back "over the evidence and over the case" before going to see them and tell them they were getting it wrong, he said: "I am the commissioner of the Met, I have many people assisting me and I have senior grade chief constables like Mr Yates. Mr Yates gave me assurances there was nothing new to the Guardian article. I think I have a right to rely on those assurances."

He went to the Guardian because the paper continued to run the campaign, he said - something for which he has now acknowledged "we should be grateful".

He denied he had taken advice from Wallis - who he said had not worked directly for him as an adviser - before the Guardian meeting.

The outgoing commissioner said he was not "pushed" when he stood down, saying that Boris Johnson and other politicians did not want him to resign. His decision was an act of leadership, he said.

That decision came after the story broke at the weekend that he had received £12,000 worth of hospitality at Champney's spa resort while he was recuperating while on sick leave; and that Wallis had done PR work for Chamnpney's.

Stephenson denied it was inappropriate for him to receive the kind of "substantial hospitality" he was given at the health spa, adding that Wallis's connection with it was unlucky. "The owner of Champneys is a family-friend connection," he said. "It was a generous offer, I paid for many treatments, it enabled me to get better very quickly. I do not think was inappropriate in that circumstance. I think it was damnably unlucky, frankly, that it seems Wallis was connected with this and that was devastating news."

Ultimately, "distracting" stories about his links to the phone hacking scandal left him with no choice but to resign, he said, adding: "It was my decision and my decision only."

Boris Johnsonrevealed on Monday that he was "hacked off" not to have been told of the employment of Wallis as a part-time adviser on "strategic communications" from October 2009 to September 2010, at a time when the force was refusing to reopen its investigation into criminal activity by the News of the World.