The writer and journalist Will Self has said he was stopped by police while out walking with his son because they suspected he was a paedophile.

The 51-year-old, who also regularly appears on television, was enjoying a long walk with his 11-year-old when a squad car and a police van stopped him on a Yorkshire roadside.

Self, author of Great Apes and The Book of Dave, said he was questioned about what he and the schoolboy were doing out walking together and his details were checked on the police national computer (PNC).

Self, an enthusiastic rambler, and his son set off in July from London to Whitby, North Yorkshire, on their walking holiday.

"No Englishman enjoying a ramble with his son should face examination by police at the roadside on suspicion of being a sexual predator," Self wrote in the Mail on Sunday.

With Self wearing full rambling gear and his son carrying a walking staff, the pair crossed the Humber bridge after 11 days on foot and were aiming to reach a bed and breakfast in North Dalton.

To shave some time off their walk while in Bishop Burton near Beverley, Self asked a security guard at an agricultural college if they could cut through the establishment's grounds. The answer was a firm no.

Self said: "The insinuation that I might pose some sort of threat to young people – in a word, that I might be a paedophile – was underscored by his eyes then sliding to my drooping son. He was being absurd and offensive."

The security guard at Bishop Burton college went on to report him to the police, who drafted in a specialist female officer from 30 miles away "since there was a presumption that a child might have to be taken into custody", according to Self.

The writer said the officer had already recognised him from the BBC comedy Shooting Stars but still phoned his details through to the PNC.

"He saw the absurdity of the idea that I would deliberately approach a security guard, in full walking equipment, while abducting a child ...

"Far from acting as some sort of local hero, the guard had abused a child himself, in particular by exposing my son to the spectacle of his father – who was guilty of nothing – being grilled by the police on the roadside as if he were engaged in a perverse activity."

He added: "Can there be a more disturbing parable of the Britain we have become?"

The father-of-four said he did not want the security guard punished, but wanted an apology.

None was forthcoming, with the school saying the guard had a second encounter with Self and his son in which he overheard them talking about walking to North Dalton, so he called the police out of concern knowing how far it was.

Self added: "Of course, whether or not this is true, it was contradicted by what the policeman had told me – and I know who I'm more inclined to believe."