Boris Johnson defended those who opposed gay people joining the military and the Chilean dictator Augusto Pinochet being arrested, in the latest controversial comments unearthed from his time as a journalist.

In articles written when he was in his mid-30s, the prime minister also wrote that the police had been cowed by the Macpherson report – which found that the Metropolitan police were institutionally racist – and claimed that officers were too busy on “racial awareness programmes” to respond to crime reports.

Johnson has been repeatedly criticised for statements he made during his career as a columnist, writer and editor, including referring to black people as “piccaninnies” with “watermelon smiles” and arguing that Islam has caused the Muslim world to be “literally centuries behind” the west.

Last week he was condemned by the shadow education secretary, Angela Rayner – who had her first baby at 16 – for once writing that single mothers were to blame for “producing a generation of ill-raised, ignorant, aggressive and illegitimate children”.

“I might be the shadow education secretary, but inside I’m that 16-year-old that didn’t think I was worth anything,” Rayner said. “And people like him make women who are already vulnerable feel that they’re the problem. They’re not the problem.”

In the most recently discovered comments, written in the Spectator magazine in 1999, Johnson said: “Across the country, there are many Tories who wish their party leadership would speak up more strongly against, say, gays in the military, or the cowing of the police by the Macpherson report, or the arrest of General Pinochet, or the impending abolition of the oath and the cap badge of the RUC [Royal Ulster Constabulary], or the abolition of the hereditary peers and foxhunting. They are, of course, right.”

The Macpherson report, produced following the murder of the black teenager Stephen Lawrence in 1993, sparked a debate about racism in policing.

In a column in the Daily Telegraph in 2000, Johnson wrote that the reason why police were unable to investigate crime was because they were “stuck on racial awareness programmes; or deployed in desperate attempts to catch paedophiles in ancient public schools; or lurking in lay-bys in the hope of penalising a motorist; or perhaps preparing for the great moment when they will be able to arrest anyone who allows his dogs to chase rabbits, let alone those who go foxhunting.”

Responding to the comments, Labour’s shadow chancellor John McDonnell said it was clear the prime minister was “a deeply unpleasant individual” and “a danger to our country”. “The more we learn, the worse it gets,” he said. “He is a danger to women, to single mothers, the working class, minorities, LGBT+ people, and to anyone who doesn’t look like him. He thinks he is born to rule and stands against everything that holds our communities together.”

During a special edition of the BBC’s Question Time in November, audience members pressed Johnson on whether his writings had fuelled racism. The prime minister said he had “genuinely never intended to cause hurt or pain to anybody”, but defended his right to “speak out”.

“If you go through all my articles with a fine-tooth comb and take out individual phrases, there is no doubt that you can find things that can be made to seem offensive, and of course I understand that,” he said.