OAK BLUFFS, Mass. — President Barack Obama said goodbye Saturday to his friend and mentor Edward M. Kennedy, offering a studious profile of a man whom he and much of the country had come to admire and respect.

There was no soaring rhetoric and only a flash or two of emotion to betray the closeness of a relationship that had grown stronger with Kennedy's endorsement of Obama's candidacy at a critical juncture in last year's election.

Presidents are keenly aware of the moments when the nation sizes them up — during war, national tragedy and funerals. His first public eulogy as president was such a moment for Obama, who has rallied the nation during collective, but not personal, crises.

As such, Obama's remarks were bereft of the politics that some had speculated he might reach for. He made only a passing mention of the legislative battles raging in Washington over the agenda that Kennedy had fought for: energy, health care and education.

And he did not use the 15-minute speech to recover the momentum he has lost during a difficult summer. Despite the global reach of his audience, Obama's remarks seemed aimed more at the people assembled at the Basilica of Our Lady of Perpetual Help in Boston than the ones watching on television.

Reading from notes instead of a teleprompter, Obama's delivery was muted and less free-flowing than his typical speeches. He was serious but flashed a wide grin when his recollections of Kennedy's jolly side made the congregation chuckle.

And he was somber, looking directly at Kennedy's widow, Vicki, as he described how deeply the senator "loved this remarkable woman from Louisiana." Moments after delivering the eulogy, the president embraced the widow, having already met privately with her Saturday morning to offer words of comfort.

After the funeral, Obama returned for one more night to Martha's Vineyard; he returns to Washington on Sunday.

Obama took a handful of advisers to Boston, traveling there with his wife, trip director and golfing pal Marvin Nicholson, senior adviser Pete Rouse and spokesman Bill Burton. Aides said the president consulted senior adviser David Axelrod and speechwriter Cody Keenan, an alumnus of Kennedy's staff, to get the tone of the eulogy right. Obama made final changes to the speech Friday night in Boston, they said.

Kennedy's fiercest critics will note that Obama barely glanced over the most controversial incidents in the senator's life, alluding only briefly to the "personal failings and setbacks" that Kennedy endured in what Obama called "the most public way possible."

But few would expect any more during a national eulogy, or from a president whose personal connection to the late senator was marked by important interactions that brought them close as Obama marched toward the political goal that had eluded his friend.

Obama's first reactions to Kennedy's death this week were reserved compared to the outpouring of emotion from others. But his eulogy Saturday conveyed his deep appreciation for the life of his friend, and he used the remarks to help shape Kennedy's final legacy.

Obama said Americans are left with one image of Kennedy: "the image of a man on a boat; white mane tousled; smiling broadly as he sails into the wind, ready for what storms may come, carrying on toward some new and wondrous place just beyond the horizon."