Former journalist Boris Johnson has generated a splash with his career advice to schoolchildren, in which he suggested journalists are "always abusing people".
The prime minister, who took part in an online class at Sedgehill Academy in Lewisham, south London, on Tuesday, used the visit to reflect on his own past as a newspaper reporter and columnist.
"When you're a journalist it's a great, great job, it's a great profession," Mr Johnson said.
"But the trouble is, sometimes you find yourself always abusing people or attacking people.
"Not that you want to abuse them or attack them, but you are being critical, when maybe you feel sometimes a bit guilty about that, because you haven't put yourself in the place of the person you're criticising.
"So I thought I'd give it a go," he added, referring to his career change.
The prime minister worked for The Times, the Daily Telegraph and The Spectator before entering politics when he was first elected as an MP at the age of 36.
And Mr Johnson added his "strong advice" was "don't do politics immediately, do lots of other things first".
Early in his career as a journalist, Mr Johnson was sacked from The Times over allegations he fabricated a quote for a front-page story.
His later career as a columnist, which he continued up until becoming prime minister in 2019, also provided a number of controversies.
Mr Johnson's writing has been heavily criticised for remarks in his past newspaper columns, which have included references to "flag-waving piccaninnies", Africans with "watermelon smiles" and "tank-topped bum boys".
Asked about the prime minister's remarks on Tuesday, Mr Johnson's press secretary Allegra Stratton told a regular briefing of Westminster journalists: "That is the prime minister talking about the fact that all of you, as journalists, your job is to challenge and that makes us in government better.
"I think that's what he meant."
Labour's shadow media minister, Chris Matheson, called on the prime minister to "withdraw these remarks and apologise".
"For Boris Johnson to say journalists are 'always abusing people' probably says more about his own career," he said.
"It is particularly troubling coming so soon after the prime minister stood by one of his ministers who attacked a journalist who was just trying to do her job.
"We know from Donald Trump that these kind of assaults on the free press are dangerous and designed to stir up distrust and division."