BOSTON — After a two-year presidential campaign that carried Democratic Sen. John Kerry ’66 through the nation’s hotly contested battleground states, the Massachusetts senator’s prospects of winning the White House diminished as a string of crucial states swung in favor of President George W. Bush ’68 in the early-morning hours Wednesday.

Buoyed by a win for the Kerry-Edwards ticket in the pivotal state of Pennsylvania, the mood at a rally of thousands of supporters here in Copley Square was hopeful. But as the nation’s electoral map filled with red on television screens across the country, showing probable Bush victories in Florida and Ohio that pushed the president towards reelection, the crowd in Kerry’s hometown of Boston grew anxious. As rain began to fall, the air chilled and campaign donors began leaving.

After spending close to $200 million — more than any other Democratic presidential candidate in history — Kerry’s chances of unseating the president appeared slim as the electoral calculus left the senator hoping for a tie at best, if Ohio’s electoral votes are included in the president’s tally.

Sen. John Edwards, Kerry’s vice presidential running mate, rallied the crowd at 2:30 a.m. Wednesday, pledging to fight for every vote as he punched his fist in the air.

“It’s been a long night, but we’ve waited four years for this victory. We can wait one more night,” Edwards said. “John Kerry and I made a promise to the American people that in this election every vote would count and every vote would be counted. Tonight we are keeping our word, and we will fight for every vote. You deserve no less.”

Earlier in the night, senior Kerry advisor Mike McCurry said the campaign would not concede Ohio to Bush.

“In Ohio, we’re waiting now for the heaviest and most Democratic votes to be counted in Cuyahoga County,” McCurry told reporters gathered at Kerry headquarters at the Copley Plaza Hotel. “We’re very confident we will win Ohio. We’re doing good in the Northwest, in Wisconsin — Minnesota, I think, will be a very comfortable victory.”

Still, it appeared that Kerry may lose the Buckeye State, and with it, the election, which several news networks reported was still too close to call as of 3 a.m.

Yale College Democrats President Nirupam Sinha ’05 said the election has been too close all along for any result to be surprising.

“Like most Democrats, I think, I’ve been cautiously optimistic that John Kerry would win,” Sinha said at about 1 a.m. Wednesday, after television networks predicted Bush would win Ohio. “But the Republicans ran a great campaign, and if they win it’s simply a matter of turnout.”

Kerry arrived in Boston midday Tuesday, and after his traditional Election Day lunch of clams and beer at the Union Oyster House, he spent four hours doing television interviews via satellite in swing-state markets. The senator watched the election returns with his family and advisors at his Beacon Hill home Tuesday night but did not come out to address the rally as expected.

Thousands of the Kerry-Edwards supporters who flooded the streets in front of the Boston Public Library — many wearing campaign buttons on their Red Sox sweatshirts and baseball hats — carried a sentiment of optimism.

At Copley Plaza Hotel, former Massachusetts Gov. Michael Dukakis, who ran as the Democratic candidate for president in 1988, said he thinks many young voters came out to vote Tuesday for Kerry because they were displeased with Bush’s first term in office.

“The economy is going edgeways,” Dukakis told a small group of reporters. “The tag they tried to pin on him was that he was a flip-flopper. But during the debates, he was a tough, strong, articulate guy versus a goofball in the first debate.”

Boston Mayor Tom Menino, a Democrat who tangled with Kerry leading up to the Democratic National Convention in Boston regarding the city’s police contracts, praised Kerry and Edwards for energizing the nation’s electorate.

“John Kerry took up a strong incumbent, a wartime president,” Menino said at a rally. “John Kerry and John Edwards believe that tomorrow will be better than today.”

As Hootie and the Blowfish played their mid-1990s hit “Hold My Hand,” huge screens book-ending an elaborate stage decorated with a giant rippled American flag displayed pictures of Kerry and Edwards shaking voters’ hands on the campaign trail. Other performers included the Black Eyed Peas, Sheryl Crow and James Taylor.

Taking the stage early in the evening, Democratic National Committee chairman Terry McAuliffe predicted victory for Kerry.

“Boston is the home of the world champion Patriots, the home of the DNC, the home of world champions Red Sox and the home of the next president of the United States,” McAuliffe said.

Neera Jain, a 24-year-old Somerville, Mass., resident, was passing out Kerry-Edwards stickers to supporters at the rally, even though she said she was uncertain what the election’s outcome would be.

“I’m really nervous,” Jain said. “Our political process is not foolproof. I hardly slept last night.”

–Poppick reported from New Haven; Post reported from Boston.