The mayor of the New Jersey city of Newark, Cory Booker, previously “hated gays” as a young man, according to a 1992 opinion piece republished by the Stanford Daily newspaper this week.

In the article from more than two decades ago, the Democrat, who used to work for the paper, wrote that he was “disgusted by gays” as a teenager, but revealed in the article what led him to change his homophobic views.

“The thought of two men kissing each other was about as appealing as a frontal lobotomy,” he said.

“Allow me to be more direct, escaping the euphemisms of my past – I hated gays,” he continued. “The disgust and latent hostility I felt toward gays were subcategories of hatred, plain and simple.”

However, he said he had a change of heart as a freshman after a gay counsellor shared his story about enduring prejudice and violence because of his sexuality.

“It was chilling to find that so much of the testimony he shared with me was almost identical to stories my grandparents told me about growing up Black,” the mayor wrote. “Well, it didn’t take me long to realise that the root of my hatred did not lie with gays but with myself.”

The mayor, who is now a supporter of gay rights and equal marriage, is planning to run for a senate seat in 2014.

He has gained a reputation for his personal involvement in public service, including going on a 10-day hunger strike outdoors to draw attention to the dangers of open-air drug dealing