HONOLULU -- As a second-stringer for the Punahou high school basketball squad, Barack Obama would fire up his teammates with renditions from the R & B group Earth, Wind and Fire. In yearbooks, he signed his name with a flourishing O, for Obama, which he topped with an Afro. In a world of 1970s rock and roll, he was known for a love of jazz.
To his classmates, the skinny kid with a modest afro had comfortably taken his place in the ethnic rainbow of Punahou, an elite prep school.
Today, Mr. Obama is a campaign-trail sensation, in part because he is seen as the first black presidential candidate who might be able to reach beyond race, building support among Americans of all backgrounds. That capacity does not surprise the students who knew Mr. Obama at Punahou, which carefully nurtured a respect for diversity.
"We had chapel sessions on the Baha'i faith, Islam, Judaism, and all forms of Christianity. The message was that diversity made for a richer community," said Bernice G. Bowers, a classmate.
Dressed like other boys in the required collared shirts and khaki pants, Mr. Obama was one of a small number of blacks, but the student body included large numbers of kids with Chinese, Japanese, Samoan and native Hawaiian ancestry, as well as many whites. "We didn't think about his blackness," said Mark Hebing, who went to school with Mr. Obama for eight years
As a candidate, Mr. Obama is also trying to show that he understands the indignities of racism and the economic troubles that many believe continue to flow from the legacy of slavery.
And it was at Punahou that Mr. Obama first came to awaken to these issues, and to the complexities of being black in America. In his best-selling memoir, "Dreams from My Father," he wrote that during his time at the school -- from fifth grade through his high school graduation in 1979 -- he felt the first stirrings of anger toward whites. He said he also delved into black nationalism.
He also experimented with marijuana and occasionally cocaine, which were ubiquitous in the 1970s but presented what, in his book, Mr. Obama called special dangers for young black men.
Mr. Obama's father was a black Kenyan; his mother a white American from Kansas. Mr. Obama was born in Hawaii and spent part of his childhood in Indonesia before returning to Honolulu and enrolling at Punahou.
Mr. Obama said that as he found his way in the world he learned there were limits to the desirability of advertising his race.
"People were satisfied so long as you were courteous and smiled and made no sudden moves," he wrote in "Dreams." "They were more than satisfied; they were relieved -- such a pleasant surprise to find a well-mannered young black man who didn't seem angry all the time."
Certainly Mr. Obama's classmates had little sense of what he described as going on beneath the surface.
"His reflections about the race issue surprised all of us," said Kellie Furushima, who still lives in Hawaii and knew him well. "He gave no indication of feeling uncomfortable in school and I never witnessed or heard anyone being unkind to him."
Punahou, a day school founded by white Christian missionaries in 1841, reflected the racial composition of Hawaii, with its large white and Asian populations. Blacks made up just 1.2 percent of the population of Honolulu, according to the 1980 census.
Mr. Obama seldom encountered the open racial hostility and discrimination that was still being expressed in many other parts of the United States. Rather, what he experienced were the subtle signals of racial attitudes that others often do not realize they are sending.
Mr. Obama wrote of being privately offended or even enraged, for example, when white classmates adopted black street slang or revealed their underlying consciousness of his race by going out of their way to tell him how much they admired a black musician or athlete.
The public persona that Mr. Obama fashioned at Punahou gave almost no hint that he felt racial tensions. He seemed to compartmentalize his life, so that his classmates had little or no knowledge of him beyond the school.
Mr. Obama lived with his grandparents in an apartment near the school, his father away in Kenya and his mother pursuing studies in anthropology. None of the 40 classmates interviewed for this article -- one tenth of his class -- saw the inside of that apartment, or had any idea Mr. Obama came to Punahou only by the grace of financial assistance with the tuition -- $15,000 a year in today's dollars.
In class he excelled in debate and composition.
Darin Maurer was amazed at what Mr. Obama could get done just over lunch at home. "This was before computers, and he could sit with a typewriter and put down a term paper pretty fast, then head back to school and hand it in." In Mr. Obama's memoir -- in which he said that many of the names in the book were made up, that chronologies had been altered and that some characters were composites -- Mr. Obama wrote about using drugs and alcohol to ease the tension he felt.
In the memories of his classmates, drug use did not set Mr. Obama apart. Almost all of those interviewed said they, too, experimented with illegal substances, were approached by dealers or at least knew someone who got high.