Judge Sotomayor’s confirmation was never in much doubt, given Democrats’ numerical advantage in the Senate. But the final vote showed a partisan divide. No Democrat voted against her, while all but 9 of the chamber’s 40 Republicans did so. She will become the first justice nominated by a Democratic president to join the court since 1994.

Senator Edward M. Kennedy, Democrat of Massachusetts, is ailing and did not vote. But the rest of the Senate filled the chamber beneath a packed gallery, solemnly rising one by one to cast a vote in the hushed room. Senator Robert C. Byrd, the 91-year-old Democrat of West Virginia who has also been ill, made a rare appearance in a wheelchair, raising his hand and murmuring his assent with a smile when a clerk called his name.

During three days of debate on the Senate floor, Republicans labeled Judge Sotomayor a judicial activist, criticizing several of her speeches about foreign law and judicial diversity  including a now-famous line lauding a “wise Latina” judge  as well as her votes in cases involving Second Amendment rights, property rights and a racial discrimination claim brought by white firefighters in New Haven.

“Judge Sotomayor is certainly a fine person with an impressive story and a distinguished background,” the Senate Republican leader, Mitch McConnell of Kentucky, said this week. “But a judge must be able to check his or her personal or political agenda at the courtroom door and do justice evenhandedly, as the judicial oath requires. This is the most fundamental test. It is a test that Judge Sotomayor does not pass.”

Image President Obama, on Thursday, hailed the confirmation as breaking yet another barrier. Credit... Brendan Smialowski for The New York Times

Democrats portrayed Judge Sotomayor as a qualified judge whose biography  rising from humble beginnings to excel at two Ivy League universities, serve stints as a prosecutor and corporate lawyer, and then 17 years as a district and appeals court judge  is a classic American success story. Her judicial record, they said, is moderate and mainstream.

“Judge Sotomayor’s career and judicial record demonstrates that she has always followed the rule of law,” Senator Patrick J. Leahy, Democrat of Vermont and chairman of the Senate Judiciary Committee, said on Thursday. “Attempts at distorting that record by suggesting that her ethnicity or heritage will be the driving force in her decisions as a justice of the Supreme Court are demeaning to women and all communities of color.”