MANCHESTER, N.H. — Presidential hopeful Barack Obama on Tuesday told high school students that when he was their age he was hardly a model student, experimenting with illegal drugs and drinking alcohol.

Obama stopped by a study hall at Manchester Central High School and answered students' questions about the war in Iraq and his education plan. But when an adult asked about his time as a student, Obama spoke bluntly.

"I will confess to you that I was kind of a goof-off in high school as my mom reminded me," said Obama, an Illinois Democrat who grew up in Hawaii

"You know, I made some bad decisions that I've actually written about. You know, got into drinking. I experimented with drugs," he said. "There was a whole stretch of time that I didn't really apply myself a lot. It wasn't until I got out of high school and went to college that I started realizing, 'Man, I wasted a lot of time.'"

Obama has written about his drug use in his memoir, "Dreams from My Father."

"Junkie. Pothead. That's where I'd been headed: the final fatal role of the young would be black man," Obama wrote. Mostly he smoked marijuana and drank alcohol, Obama wrote, but occasionally he would snort cocaine when he could afford it.

Drugs, Obama wrote, were a way he "could push questions of who I was out of my mind, something that could flatten out the landscape of my heart, blur the edges of my memory."

Obama told students he developed his sense of social justice at college - he attended Occidental College in Los Angeles for two years before transferring to Columbia University in New York. Before he got to Columbia, he said, he lived a naive life.

"I went to high school in Hawaii, so there was a lot of opportunity to goof off because the weather is really good all the time," he said. "I did well in school, but I didn't really apply myself. I did what I needed to do to get into college and it came fairly easily to me."

His biggest interest was in sports and girls.

"I was big on basketball. We were state champs. I thought I was better than I was," said Obama, who finds time on the campaign trail to still play a pickup game.

During a campaign stop in Chicago, Republican presidential candidate Rudy Giuliani was asked if he thought Obama's comments to the students were appropriate.

"I respect his honesty," Giuliani said.

"One of the things that we need from our people that are running for office is not this pretense of perfection," said Giuliani, who has faced questions about his own personal life marked by three marriages and estrangement from his two children. He said of the candidates, "we're all human beings."

"If we haven't made mistakes, don't vote for us," Giuliani said.

Copyright 2007 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.