With Vice President Gore presiding, a joint session of Congress yesterday officially tallied the electoral votes that will make George W. Bush the next president in a ceremony punctuated by reminders of the bitter and marathon struggle that resulted in Bush's narrow victory.

The pageant that unfolded on the House floor was rooted in history and the Constitution, a highly scripted last act in the presidential election process. But in keeping with the unprecedented 36-day post-election battle in Florida, it contained moments of drama, unresolved rancor and irony.

When it came time to count Florida's votes, House Democrats, most of them members of the Congressional Black Caucus, rose one by one to object to the awarding of the state's 25 electors to Bush and his running mate, Richard B. Cheney. In each case, Gore, standing behind the speaker's desk, ruled the objection could not be heard because of an 1877 law that requires any protest of electoral votes to be accompanied by the signature of a senator. No senator had agreed to join in the 20 objections raised by the House Democrats.

Fittingly, it took almost 20 minutes -- about 10 times that for any other state -- before Florida's votes were accepted.

"We did all we could," Rep. Alcee L. Hastings (D-Fla.) said to Gore near the end of the protest. "The chair thanks the gentleman," Gore replied with a smile.

Finally, almost two hours after the ceremony began, Gore announced the outcome in a flat voice, underscoring the extraordinary closeness of his contest with Bush. There are a total of 538 electoral votes, and 270 are necessary to be elected, he intoned, and the tally showed that George W. Bush of Texas had received 271 votes for president and Al Gore of Tennessee 266 votes. Richard B. Cheney of Wyoming had received 271 votes for vice president, Gore continued, and Joseph I. Lieberman of Connecticut 266 votes.

"May God bless our new president and our new vice president and may God bless the United States of America," Gore said as members of both parties rose to applaud.

Asked about the final tally at his ranch in Crawford, Tex., Bush said, "It's a humbling experience. I want to reiterate what I said before: I'm going to be the president of everybody, whether they supported me or not."

Gore presided at the joint session in his constitutional role as president of the Senate. He was the first sitting vice president who was also his party's defeated presidential nominee to do so since Richard M. Nixon presided at the electoral vote tally that certified John F. Kennedy as the winner of the 1960 presidential election.

In one of his last public acts as vice president, Gore clearly sought to carry out his duty with grace and humor. The roll of the states was called in alphabetical order, and when it reached California -- the first state called that was carried by Gore -- he pumped his right fist in the air, provoking applause from the assembled lawmakers.

When Hastings asked whether Gore's rulings from the chair could be appealed, the vice president said, "This is going to sound familiar to you" as he again cited the 124-year-old law that Congress enacted to govern electoral vote contests after the 1876 election produced competing slates of electors from a few states.

But while the House Democrats knew that their objections would not be accepted, some of the lingering bitterness from the 2000 election filtered through the elaborate proceedings. Words like "fraud" and "disenfranchisement" could be heard above the din of Republicans calling for "regular order."

The Democratic protest was led by Black Caucus members who share the feeling among black leaders that votes in the largely African American precincts overwhelmingly carried by Gore were not counted because of faulty voting machines, illicit challenges to black voters and other factors.

"It's a sad day in America," Rep. Jesse L. Jackson Jr. (D-Ill.) said as he turned toward Gore. "The chair thanks the gentleman from Illinois, but . . . " Gore replied.

At the end of their protest, about a dozen members of the Black Caucus walked out of the House chamber as the roll call of the states continued.

Fewer than one-third of the House's 435 members and fewer than half of the 100 senators attended the session. The missing included some of the major figures from last year's election, including Lieberman, the Connecticut senator who was Gore's running mate; Arizona Sen. John McCain, Bush's chief challenger for the nomination; and Hillary Rodham Clinton, who is in the waning days of her role as first lady and just beginning her career as the junior Democratic senator from New York.

Those who did attend witnessed a ceremony steeped in tradition, beginning with the announcement of the arrival at the House door of the vice president and members of the Senate, who were led into the chamber by Senate pages carrying two mahogany boxes containing large envelopes with the certified electoral votes of each of the states and the District of Columbia.

Lawmakers from both parties said they decided to show up to observe a historic event, one that closed the curtain on an election in which Gore, the electoral college loser, won more than 500,000 more popular votes than Bush.

"I didn't expect there would be any serious threat to Bush's election, but it was the closest election in American history and I wanted to see the process," said freshman Rep. Adam Schiff (D-Calif.), who reminisced about election night with some of his colleagues during the proceedings. "It seems now like a hundred years ago."

Rep. Doug Ose (R-Calif.), who sat beside his 8-year-old daughter, Erika, and his 6-year-old daughter, Emily, was one of several members who brought their children. As the joint session began, Erika inquired, "Why is the vice president here?"

But by the end of the proceedings, Gore had achieved celebrity status in the chamber, with dozens of lawmakers, congressional staff members and pages lining up to request his autograph. The two senators and two House members who had recorded electoral votes asked him to sign their teller sheets, while others submitted yellow admission tickets. House Speaker J. Dennis Hastert (R-Ill.), who sat behind the speaker's desk as Gore presided, asked Gore to sign the wooden gavel he had used during the session.

After repeatedly invoking the House parliamentarian's advice during the vote count to deny the Democratic objections, Gore turned to the parliamentarian's staff once the session had ended and declared, "Thanks, guys. I always do well when I'm given a script."

Although much of the top GOP leadership turned out for the proceedings -- in addition to Hastert, Senate Majority Leader Trent Lott (Miss.), House Majority Leader Richard K. Armey (Tex.) and National Republican Congressional Committee Chairman Thomas M. Davis III (Va.) were there -- only one member of the Democratic leadership, House Caucus Chairman Martin Frost (Tex.), attended, briefly at the start of the session.

Armey said GOP leaders had received assurances by Wednesday that there would be no serious objection to the count. House Minority Leader Richard A. Gephardt (D-Mo.), whose aides consulted with Gore's staff, urged the Black Caucus members not to raise an objection because the vice president did not support such a move. But caucus members argued in a news conference yesterday that they had no choice but to challenge Bush's election. "There comes a time you have to take your destiny into your own hands, no matter what is being said by whom," said Rep. Maxine Waters (D-Calif.).

The black lawmakers mocked the idea that they should put the election behind them -- "We will never get over this," said Rep. Corrine Brown (D-Fla.) -- and vowed to challenge Bush's Cabinet choices and appointees. They also criticized Senate Democrats, who they said had courted African Americans' votes and were obligated to object to Bush's victory.

But Vermont Sen. Patrick J. Leahy, the top Democrat on the Senate Judiciary Committee, said in an interview that he and other senators did not want to cause a ruckus. "There is a great deal of frustration that the Supreme Court decided the election by stopping the count in Florida," he said. "As much as I disagree with the court's decision, I uphold it as the law of the land and won't object. We will, all of us, Democrats and Republicans, accept George W. Bush as the next president."

Vice President Gore laughs along with some members of Congress as he rejects objections over Florida's vote count. It took almost 20 minutes -- about 10 times as long as for any other state -- before Florida's votes were accepted.Vice President Gore reacts to cheering tourists as he leads senators through the Hall of Statues on the way to officially tally the electoral votes.