WASHINGTON (CNN) -- Shortly before his death, Sen. Edward M. Kennedy wrote a letter to Pope Benedict XVI asking for the pontiff to pray for him as he struggled with an aggressive form of brain cancer, it was revealed at his graveside service Saturday evening.
Members of the Kennedy family gather at the gravesite Saturday evening.
Kennedy, the youngest and last-surviving brother of a heralded Kennedy generation, was laid to rest on a hillside at Arlington National Cemetery alongside his slain brothers, the late President John F. Kennedy and Sen. Robert F. Kennedy -- both assassinated more than four decades ago.
Cardinal Theodore McCarrick read a recent letter from Kennedy to the pope at the private burial ceremony in Arlington, Virginia.
"I am writing with deep humility to ask that you pray for me as my own health declines," McCarrick said, quoting from Kennedy's letter.
"I was diagnosed with brain cancer more than a year ago, and although I continue treatment the disease is taking its toll on me. I am 77 years old, and preparing for the next passage of life," the cardinal read. Read excerpts from Kennedy's letter to pontiff
The burial service at dusk followed a eulogy by President Barack Obama in Massachusetts, a brief prayer service outside the U.S. Capitol and a procession through the crowd-lined street of Washington's streets.
Among the congressional colleagues greeting the Kennedy family at the Capitol was 91-year-old Sen. Robert Byrd, D-West Virginia, who has been out of the spotlight lately because of deteriorating health. Watch an overview of the day's events »
Many who had gathered at the Capitol were visibly emotional and wiping tears from their eyes. Some held framed photos of Kennedy, and many held American flags that they waved during a singing of "America the Beautiful."
The Rev. Daniel Coughlin -- chaplain of the House of Representatives -- said a prayer and addressed the family.
"Here we are to pray with you, offer sympathy and thank you," he said. "Thank you for sharing the senator."
Coughlin also noted that Kennedy's hopes were "unquenchable, full of immortality."
As Kennedy's widow, Vicki, went back into the car, she waved to the crowd and mouthed, "Thank you" as the crowd erupted into applause.
The late senator's son, U.S. Rep. Patrick Kennedy, addressed those on the steps, saying how his father "knew that he was only great because he had great people supporting him."
"He would be very proud to see you all out here today paying a final respect and tribute to his memory," he said.
Earlier Saturday at the funeral in Boston, Massachusetts, Obama hailed Kennedy as "a champion for those who had none; the soul of the Democratic Party; and the lion of the U.S. Senate."
"He was given the gift of time that his brothers were not, and he used that gift to touch as many lives and right as many wrongs as the years would allow," the president said.
"We can still hear his voice bellowing through the Senate chamber, face reddened, fist pounding the podium, a veritable force of nature, in support of health care or workers' rights or civil rights," Obama said, calling Kennedy "the greatest legislator of our time." Watch President Obama's full eulogy »
Kennedy's son Ted Jr. delivered a tender, personal remembrance of his larger-than-life father. He said his father "never stopped trying to right wrongs."
Kennedy lived up to the ideals of three older brothers, all of whom died young -- Joseph in World War II, President John and Sen. Robert assassinated -- his son said.
"He answered Uncle Joe's call to patriotism, Uncle Jack's call to public service and Bobby's determination to seek a newer world.
"Unlike them, he lived to be a grandfather, and knowing what my cousins have been through, I feel grateful that I have had my father as long as I did," Ted Jr. said.
"My father was not perfect, but he believed in redemption," he said.
And he said Kennedy had made light of his failure to become president, despite the weight of expectations on him as a Kennedy.
"I don't mind not being president, I just mind that someone else is," he quoted his father as saying, closing his remembrance with a line from Kennedy's famous 1980 concession speech that ended his presidential ambitions: "The work goes on, the cause endures, the hope still lives and the dream will never die." Watch as Ted Kennedy Jr. recalls his dad's help when he lost his leg as a boy »
The funeral began with a hearse bearing Kennedy's body through Boston rain from the John F. Kennedy Presidential Library to Mission Church. A military honor guard carried the coffin through a sea of black umbrellas into the church. Watch as military honor guard carries Kennedy's casket »
People lined the streets of Boston cheering for Kennedy as the service began, despite the rain. Local bars and restaurants were packed with people watching the live coverage on television inside.
Former presidents Bill Clinton, George W. Bush and Jimmy Carter also came to honor the late legislator, known as the lion of the Senate.
Vicki Kennedy accepted condolences from each of the current and former presidents before Holy Communion.
The program concluded with an undated quote from Kennedy: "For all my years in public life, I have believed that America must sail toward the shores of liberty and justice for all. There is no end to that journey, only the next great voyage. We know the future will outlast all of us, but I believe that all of us will live on in the future we make."
Many of Kennedy's fellow senators past and present came to say a final farewell.
Other mourners included Vice President Joe Biden and former Vice Presidents Al Gore and Dan Quayle, all veterans of the Senate, where Kennedy served for 47 years. Massachusetts Gov. Deval Patrick, CIA chief Leon Panetta, and several Cabinet members also turned out to pay their respects. Watch as Mass for Kennedy begins »
Sen. John McCain, the 2008 Republican presidential candidate, chatted with Sen. Chris Dodd, a Connecticut Democrat, in the pews before the ceremony began.
Honorary pallbearers at the service included Dodd, Supreme Court Justice Stephen Breyer, Democratic Sen. John Kerry of Massachusetts -- his party's 2004 presidential candidate -- and long-time Massachusetts Rep. Ed Markey, also a Democrat.
The actual pallbearers were Kennedy children, nieces and nephews.
World-renowned cellist Yo-Yo Ma performed two pieces during the service, and was joined by the tenor Placido Domingo for one of them.
At the graveside service were a number of family members, as well as Vice President Joe Biden.
Kennedy's grave is 95 feet south of his brother Robert's, which is just steps away from the burial site of another brother, former President John F. Kennedy.
A single white, wooden cross will be placed at the head of the grave and a marble footmarker put in place. The footmarker reads: "Edward Moore Kennedy 1932-2009." The setup is identical to Robert Kennedy's grave, Arlington cemetery spokeswoman Kaitlin Horst told CNN.
Kennedy, the patriarch of America's leading Democratic family for more than 40 years, died at the age of 77 on Tuesday, 15 months after being diagnosed with brain cancer.
CNN's Jessica Yellin, John King and Elaine Quijano contributed to this report.