President Barack Obama has paid tribute to his "friend and mentor", Edward Kennedy, at the senator's funeral Mass in Boston.
Mr Obama said Senator Kennedy was the "greatest legislator of our time" and a "champion for those who had none".
The body of Senator Kennedy, who died on Tuesday of brain cancer aged 77, has now arrived at the US Capitol in Washington for a brief prayer service.
The coffin will then be taken for burial in Arlington National Cemetery.
Senator Kennedy will be laid to rest near his assassinated brothers, ex-President John and Robert.
During a two-day public viewing at the John F Kennedy Presidential Library, some 50,000 people paid their respects before the Massachusetts senator's flag-draped coffin.
President Obama said in his eulogy at the Our Lady of Perpetual Help Basilica: "I knew him as a colleague, a mentor and above all as a friend."
AT THE SCENE
Richard Lister, BBC News, Boston
Music from Yo-Yo Ma set the tone for a sombre occasion which at times had the pomp and ceremony of a state funeral. Before reaching the basilica, the cortege moved slowly through the grey, rain-shrouded Boston streets.
As it did, it passed crowds of people lining up to say their last farewells. Others leaned out of windows some cheering and waving the American flag.
The senator will be buried near his two brothers, who were assassinated in the 1960s. Though many others in the Kennedy family are also in public life, this is widely regarded as the end of an important chapter in America's most famous political dynasty.
He called Senator Kennedy a "kind and tender hero", adding: "He was the soul of the Democratic Party and the lion of the US Senate."
The president pointed to some of the tragedies that had befallen the Kennedy family, saying: "It is a string of events that would have broken a lesser man... but that was not Ted Kennedy."
The president said: "His resilience and good humour would see Ted Kennedy through more pain and tragedy than most of us will ever know."
Among the guests attending Saturday's Roman Catholic Mass were former Presidents George W Bush, Bill Clinton and Jimmy Carter, as well as some 80 serving and former senators.
Dozens of Kennedy relatives attended the service.
Senator Kennedy's son, Ted Kennedy Jnr, said it had not always been easy living with the Kennedy name but that he was "never more proud of it than today".
In a heartfelt, emotional and at times humorous tribute to his father, he said: "He was not perfect but he believed in redemption. He never stopped trying to right wrongs, whether they were the result of his failings or of ours."
A succession of nieces, nephews and grandchildren also delivered tributes to Senator Kennedy.
Cellist Yo-Yo Ma and tenor Placido Domingo both performed at the funeral.
Ahead of the service, family members had gathered for a brief prayer at the John F Kennedy library.
Senator Kennedy's widow Vicki fought back tears as the coffin was then removed to be taken to the basilica.
'Thank you Teddy'
After the Mass, Senator Kennedy's body was flown to Andrews Air Force Base in Washington before transferring to a final motorcade.
Hundreds of people gathered outside the US Capitol, where a brief prayer service was organised for members of the Senate community to bid a final farewell.
The coffin will then be driven to Arlington for a final, private burial service.
Three days of ceremonies to commemorate the senator's life began on Thursday with a private family Mass at the family property in Hyannis Port, Massachusetts.
His body was then driven in a long procession to Boston along roads lined with thousands of mourners - some waving American flags, others holding up signs that read "Thank you Teddy".
After the public paid their respects in Boston, a three-hour memorial service described as a "celebration of life" began at the JFK library on Friday evening.
In keeping with the Kennedy family's Irish heritage, the service featured laughter and music, as well as tributes to the senator, who had long been the leader of one of America's great political dynasties.
In the US, Senator Kennedy's death has been seen as the end of an era, following the assassinations of his brothers in 1963 and 1968.
Although hailed as one of the most influential US politicians, the senator's career remained blighted by the incident in 1969 when he drove his car off a bridge at Chappaquiddick in Massachusetts. He fled the scene and a female companion, Mary Jo Kopechne, died.