Kennedy was then driven across the river for a hero's burial in Arlington National Cemetery.
The last of a band of brothers whose father prepped them for political power and whose tragedies and triumphs are intertwined with five decades of the nation's history, Kennedy never became president but he is exiting the national stage as one.
Mourners at his funeral Saturday included former presidents Bill Clinton, George W. Bush and Jimmy Carter and more than 80 current and former members of Congress — a bipartisan delegation that attested to Kennedy's ability to maintain friendships in the face of fierce political differences.
"He could disagree without being disagreeable," said former senator Phil Gramm, a conservative Texas Republican whose fiscal conservatism put him on the opposite side of the unabashedly liberal Kennedy in most debates.
After Kennedy was diagnosed with the brain cancer that killed him Tuesday at the age of 77, Gramm said he wrote him a joking note: "I told him that since I'd always believed God was a conservative, I thought I'd help him out by putting him at the top of my prayer list," Gramm said.
"He wrote me back right away saying, 'Thanks for covering all my bases. I feel better already.' "
Kennedy chose the site of his funeral, a massive Roman Catholic basilica where he prayed for his daugther, Kara, when she was being treated successfully for lung cancer nearby.
The surrounding neighborhood is a cultural polyglot that reflects the latest waves of Boston's newcomers — a Spanish iglesia sat across the street from the basilica as well as a Punjabi market..
It was an appropriate departure point for Kennedy, who always spoke with pride of his own immigrant roots and whose first major legislative victory, in 1965, was the passage of legislation that ended the long-standing bias in U.S. immigration laws for Northern Europeans and opened the door for a wave of immigration from Asia, Africa and Latin America.
For decades, the Kennedy family's knack for drama and pageantry has held the nation spellbound, and the funeral service for the youngest of Joseph and Rose Kennedy's nine children was no exception. Cellist Yo-Yo Ma and tenor Placido Domingo provided some of the music; Kennedy's relatives delivered the readings and prayers.
Sons Teddy and Patrick struggled at times to get through affectionate reminiscences. Patrick, a Democratic congressman from neighboring Rhode Island, described how his father cared for him during childhood asthma attacks, sometimes holding a cold compress on his son's head until he fell asleep.
Teddy choked up describing how his father insisted on taking him sledding shortly after his cancer surgery. "I know you can do it," he remembered his father telling him. "There is nothing you can't do."
Obama also highlighted the resilience and relentless optimism of a politician who persevered in the face of personal and political catastrophes, including a 1969 car accident in which Mary Jo Kopechne drowned when a car Kennedy was driving veered off a bridge.
Though "he experienced personal failings and setbacks in the most public way possible," Obama said, Kennedy taught Americans by example that "individual faults and frailties are no excuse to give in."