President Obama considered pursuing a gay relationship while he was a college student, according to a new 1000-plus page tome by a Pulitzer prize-winning biographer.

Writing about the former president's two years at Occidental College in Los Angeles, author David J. Garrow discloses in Rising Star: The Making of Barack Obama the close relationship Obama had with assistant professor Lawrence Goldyn.

'Goldyn made a huge impact on Barry Obama,' Garrow writes. 'Almost a quarter century later, asked about his understanding of gay issues, Obama enthusiastically said, "my favorite professor my first year in college was one of the first openly gay people that I knew…He was a terrific guy." with whom Obama developed a 'friendship beyond the classroom.'

When the Advocate, a leading gay and lesbian magazine, asked president Barack Obama 2009 who had most profoundly influenced his ideas about gays and lesbians, he second person - after his mother -was his political science professor at Occidental College, Lawrence Goldyn, here visiting the president in the Oval Office. Goldyn has since become a doctor

It was the winter of 1980 when Obama took a political science course at Occidental taught by the openly gay professor, a 1973 graduate of Reed College in Oregon with a PhD from Stanford.

To say that Goldyn was out 'would be an understatement,' a fellow student at the college told Garrow. Goldyn was 'funny, engaging' and 'wore these really right bright yellow pants and open-toed sandals.'

Goldyn was one of the first gay people that Obama knew and Obama said the 'strong friendship that developed helped to educate me.'

Goldyn would remember that Obama was not fearful of being associated with him.

Three years later, writes the author, 'Obama wrote somewhat elusively to his first intimate girlfriend that he had thought about and considered gayness but ultimately decided that a same-sex relationship would be less challenging and demanding than developing one with the opposite sex.'

To say that Goldwyn was out 'would be an understatement,' a fellow student at the college tells Garrow. Goldwyn was 'funny, engaging' and 'wore these really right bright yellow pants and open-toed sandals.'

The Advocate, a leading gay and lesbian magazine asked President Obama 2009 who had most profoundly influenced his ideas about gays and lesbians, the second person he named - after his mother - was Lawrence Goldyn.

'He was a wonderful guy,' Obama said. 'He was the first openly gay professor that I had ever come in contact with, or openly gay person of authority that I had come in contact with.

'And he was just a terrific guy. He wasn't proselytizing all the time, but just his comfort in his own skin and the friendship we developed helped to educate me on a number of these issues.'

Goldyn retrained as a doctor and is now an HIV specialist in Mendocino, California.

David Garrow, author of the wrote a Pulitzer Prize-winning biography of Martin Luther King Jr., and is a regular contributor to The New York Times and The Washington Post.