Boris Johnson has spoken of his regret on concocting a quote about King Edward II and the monarch’s gay lover, when he was a junior reporter at the Times in the late 1980s.

In a BBC documentary broadcast on Monday, the London mayor was asked about having to leave the paper because of the incident.

He was sacked for falsifying a quotation from his godfather, Colin Lucas, later vice-chancellor of Oxford University.

The Guardian documents that as a 23-year-old Times trainee Mr Johnson wrote a May 1988 article about archaeologists’ discovery of Edward II’s 14th-century palace.

He quoted Colin Lucas, giving the colourful detail that the monarch “enjoyed a reign of dissolution with his catamite, Piers Gaveston” at the palace. Gaveston was indeed rumoured to have been the king’s lover – but was also beheaded in 1312, a dozen years before the palace was built.

Of the quote, Mr Johnson told filmmaker Michael Cockerell: “It was awful… I remember a deep, deep sense of shame and guilt… just not knowing how to sort it out… it was a bit of a bummer frankly.”

King Edward fathered at least five children by two women and was rumoured to have been bisexual by UK’s leading historians.

Along with several other allegedly questionable incidents from the mayor’s past, in a controversial interview last Sunday, BBC broadcaster and journalist Eddie Mair quizzed Mr Johnson about the quote.

The mayor admitted: “I mildly sandpapered something somebody said”.