As a young lawyer in the segregated South, Thurgood Marshall ate and slept in his car because he could not get a hotel room. Thursday, at his funeral under the vaulted arches and blue stained-glass windows of the National Cathedral, he was mourned by the president of the United States and most of the nation's leaders. Millions of television viewers watched the service, joining the 3,500 in the cathedral and the 100 more who stood outside in the cold morning air. They heard Marshall recalled as one of history's great civil-rights figures, a lawyer and judge whose achievements opened schools, courtrooms, housing projects and voting booths to Americans long treated as second-class citizens. Marshall will be buried today in a private ceremony at Arlington National Cemetery. Chief Justice William H. Rehnquist, who often found himself on opposite sides of Marshall on many constitutional issues during their years together on the bench, spoke of his deep admiration. "Under his leadership, the American constitutional landscape in the area of equal protection of the laws was literally rewritten," the chief justice said in his eulogy. "As a result of his career as a lawyer and as a judge, Thurgood Marshall left an indelible mark not just upon the law but upon his country. Inscribed above the front entrance to the Supreme Court building are the words "Equal justice under law.' Surely no one individual did more to make these words a reality than Thurgood Marshall." The 84-year-old jurist, who died Sunday of heart failure, was described by other eulogists as a practical joker, a teacher and champion of underdogs, and the only contemporary member of the Supreme Court who had ever tried murder cases, had clients who were lynched, and had personally felt the oppression of segregation. A few paces from the wooden coffin draped in a simple white cloth that had been brought in by former colleagues and clerks sat President Clinton and his wife, Hillary, and Vice President Gore and his wife, Tipper, who had come to pay their respects to this son of a Pullman car waiter. In another front row were many members of the Kennedy family. But the ceremony was as much a celebration as it was a mourning. The choir from Howard University, where Marshall earned his law degree after being rejected by the University of Maryland because he was black, sang The Battle Hymn of the Republic, which he had often suggested should become the National Anthem. The church's Great Organ played Aaron Copland's Fanfare for the Common Man. And the service closed with the hymn Lift Every Voice. Vernon E. Jordan Jr., a former civil-rights leader and now adviser to Clinton, said Marshall's mission was "to cleanse our tattered Constitution and our besmirched legal system of the filth of oppressive racism and to restore to all Americans a constitution and a legal system newly alive to the requirement of justice." "By demonstrating that the law could be an instrument of liberation, he recruited a new generation of lawyers who had been brought up to think of the law as an instrument of oppression," Jordan said. "Those of us who grew up under the heel of Jim Crow were inspired to set our sight on the law as a career, to try to follow him on his journey of justice and equality." William T. Coleman Jr., the transportation secretary in the Ford administration, said Marshall had set out to complete the work begun by Abraham Lincoln. "History," he said, "will ultimately record that Mr. Justice Marshall gave the cloth and linen to the work that Lincoln's untimely death left undone." Coleman also wondered aloud about whether Clinton could have achieved his success, or whether many of his new Cabinet members would have made it, were it not for Marshall's successful efforts at integrating the schools in Arkansas and elsewhere. Ralph K. Winter, one of Marshall's first clerks when he sat on the federal appeals court in New York, recalled how in the 1940s Marshall would call travel agencies, and by posing as a customer and uncovering their discrimination, would get them shut down. Judge Winter, who now sits on the U.S. Court of Appeals for the Second Circuit in New York, said that to Marshall's surprise, one travel agent actually got him a room in a Florida hotel. "Excuse me, is this hotel restricted?" Marshall is said to have asked, still trying to bait the travel agent into revealing that she discriminated. The travel agent replied: "Oh, Mr. Marshall, I didn't know you are Jewish." Judge Winter said Marshall then put on one of his richer Southern accents and said, "Ahh got news for you!" Winter said that Marshall was sparse in his praise of clerks, and that one of favorite appellations for them was "knucklehead." "I'm prouder of the title "knucklehead' than any other one I've ever had," he said.