BOSTON - U.S. presidents, members of Congress and the public gathered on a rainy Saturday to say goodbye to Senator Edward Kennedy, a towering figure in American politics who contributed to major social changes of the last 50 years.

Senators and U.S. representatives of both political parties joined the large Irish-American Kennedy clan at the John F. Kennedy Library and Museum for yet another tribute, which then moved to a Roman Catholic church for a funeral where President Barack Obama was to deliver the eulogy.

The gathering of dozens of lawmakers from the last several decades -- many of whom had been Kennedy's fiercest foes on legislation -- heard a brief prayer before departing for the funeral.

Since Kennedy's death on Tuesday of brain cancer at age 77, Americans have staged a series of memorials to the last of the Kennedy brothers and patriarch of a political dynasty that has been the closest thing to American royalty.

Kennedy's casket will be flown to Washington after the funeral and taken to Arlington National Cemetery to be buried close to his brothers, former President John F. Kennedy and Senator Robert Kennedy, who were assassinated in the 1960s.

Edward Kennedy's early career was overshadowed by the lives and deaths of John and Robert, but he went on to serve nearly 47 years in the Senate, where he became a champion of liberal Democrats and was both reviled and respected by conservative Republicans.

'WHERE WOULD I BE?'

Where would I be as a black man without the Kennedys? They believe in civil rights and that's why I am here to honor this great man, said Clint Haymon, one of hundreds of mourners gathered outside the church despite a steady rain.

We had to come here. He committed a lot of his time to causes we believe in, said Douglas Geer, 43, of Walpole, Massachusetts, the father of an autistic child. Our child benefited from his work.

Boston police opened a blocked sidewalk and spectators ran to get a spot. Across the street, families leaned out windows from a row of three-story apartment buildings.

Cellist Yo-Yo Ma will play and opera star Placido Domingo will sing at the funeral at a Roman Catholic basilica in a working class section of Boston.

The political figures on hand included former presidents Jimmy Carter, Bill Clinton and George W. Bush.

Hours before he was to give the eulogy, Obama met privately for about 10 minutes with Victoria Kennedy, the senator's wife.

The senator chose Our Lady of Perpetual Help Basilica because it was where he prayed daily while his daughter Kara, now 49, was at nearby hospital battling lung cancer in 2003.

On Friday, dignitaries from both sides of the political aisle attended an invitation-only memorial service at the Kennedy library that was punctuated by teary remembrances, funny anecdotes and song.

That followed a public viewing that drew more than 30,000 mourners -- so many that security had to turn people away.
(Writing by Daniel Trotta; Editing by Doina Chiacu)