Secretary of the State ruled Wednesday that Democrat Dan Malloy prevailed by 3,130 votes over Republican Tom Foley in the race for governor, a margin too wide to require a recount.

Bysiewicz also said that the decision to let some polls in Bridgeport stay open until 10 p.m. did not make the difference in the race, since only about 500 votes were cast between 8 and 10 p.m.

After all-night vote-counting in Bridgeport and late returns in other large Democratic strongholds, chances appeared good that Malloy would eke out a narrow victory over Foley in the preliminary returns.

Malloy's chief campaign consultant, Roy Occhiogrosso, said in a brief phone conversation Wednesday morning that the campaign was confident it would come out on top.

But there were also rumblings of discontent from Republicans, some of whom protested the decision to extend voting hours in Bridgeport after the city ran out of ballots, causing huge delays for people seeking to cast their votes.

Chris Healy, the chairman of the state Republican Party, said in an interview Wednesday that it would be up to the Foley campaign to decide whether to challenge the Bridgeport decision in court, since "they are the aggrieved party."

But the Republicans have other concerns, he said, "issues that we'd hope to make part of the record ... about what happened before, during and after the vote. It wasn't just the extension of the hours."

Meanwhile, Republicans are bracing for a recanvass of polling places, Healy said, much like the recount he helped oversee when managing then-Rep. Rob Simmons' losing reelection campaign in the 2nd District in 2006.

"We're preparing for that," Healy said.

"We have a lot more information than we did last night, but all our models are holding, and that tells us we believe we've won," Foley said in an interview. "But we're within the margin of a recount and I don't think Malloy's people would waive their right to a recount."

Foley said there were no immediate plans to challenge the two-hour voting extension in Bridgeport, assuming his current lead holds. But if a recount shows him losing to Malloy, he said, a court challenge is possible.

"We'll be interested in seeing during a recount what shows up," he said. "And if it results in our being down, which we don't think it will, that would have to be something we look at."

The two hour extension, Foley said, "obviously is something that favors Malloy."

Malloy said he is confident that he will win, adding that a recount would not be necessary.

"After a long night, I am confident that when the secretary of the state certifies the results of the election Nancy Wyman and I will be declared the winners, and that a recount will not be necessary," said Malloy in a statement. "Our count shows us with a lead of more than 11,000 votes (approximately 1%), which will likely increase because the precincts that have yet to officially report – in Bridgeport, New Haven, and a few other towns -- are ones in which Democrats have traditionally outpolled Republicans. "

Results from Bridgeport were released at 7 this morning, according to the Connecticut Post, with Dan Malloy receiving 19,847 votes to Foley's 6,634.

The Hartford Courant reported this morning that Foley's lead is now 50-49 percent with 90 percent of the precincts reporting. The difference amounts to 11,083 votes.

Malloy had declared victory early this morning, but Foley countered that he was confident that when all the votes are counted he will be the next governor of Connecticut.

Foley finally stepped on stage in a Greenwich Hyatt ballroom at 1:05 a.m., joined by his wife and son, and said the outcome would not be known until the "wee hours."

He said it was not clear when late ballots cast in Bridgeport would be counted, in which case it would make more sense for "everyone to go home and get a good night's sleep."

At about the same time, at The Society Room in Hartford, Malloy was giving his victory speech.

"Now I believe we can say that the worst of it is over. We will change direction. Tonight is the beginning of all of the lasts that Connecticut has found itself in the last 20 years - the beginning of the end of the last," Malloy told supporters.

Malloy acknowledged that the race was extremely close and that Foley could contest the results.

The candidates' appearances capped a bizarre Election Day in which the Bridgeport polls were ordered open for an additional two hours by a judge and both candidates, as Tuesday turned into Wednesday, hinted that they had won.

Voting tallies from the Associated Press had Foley ahead, 52 percent to 47 percent, after midnight, but with the vote in some of the largest cities not yet counted, Fox News was projecting Malloy as the winner.

Shortly before midnight, Nancy Wyman took the stage and acknowledged what most in the room had already heard: that, despite Foley's lead in the returns on the television screens, Malloy had won. As of Wyman's appearance, the cities of New Haven, Bridgeport, and Stamford had not been counted yet, and Malloy was expected to do well there.

"There's a rumor out there," Wyman said, drawing out her words and pausing a moment, "but we're not saying and we're not ready to accept it. … But some people have said we won the election."

"We feel really good about where we are right now - Tom's got a 50,000 vote lead," Clark said. "We're still waiting for a few more towns to come in. We're looking forward to a great party tonight."

Foley, the Greenwich businessman and former U.S. ambassador to Ireland, had waited out the ballot-counting in a third-floor suite at the Greenwich Hyatt.

Hundreds of his supporters watched Fox News coverage in a ballroom below, roaring each time their candidate's lead flashed on the screen. Early returns showed him ahead, 52 percent to 46 percent with 20 percent of precincts reporting. The margin had slipped to 51 to 47 percent with 29 percent reporting. Even with nearly 70 percent reporting, Foley was still in the lead.

However, many votes in Connecticut's traditionally Democratic-leaning big cities, including Bridgeport, had yet to be counted.

The vote tally was slowed when a Superior Court judge approved a two-hour delay in the close of polls in Bridgeport, which at one point Tuesday had run out of ballots.

Earlier Tuesday, Malloy had interpreted news of the Bridgeport ballot shortage as boding well for him.

During a stop at the Hopewell Elementary School in Glastonbury, Malloy said New Haven voters were turning out and, "in Bridgeport, it's so strong that they ran out of ballots."

Malloy had watched his lead in the polls shrink and then disappear during the last few weeks, until finally a Quinnipiac University poll on Monday gave Foley a 3-percent lead. But Malloy insisted during a rally held Monday night that polls have been misjudging his campaign and that a stronger than expected push from the cities would carry him over the top.

Malloy supporters had been hoping for a repeat of the primary, when Malloy trailed by 3 percentage points in the polls before trouncing former Senate nominee Ned Lamont by 16 percentage points.

Independent vote crucial

All day, during more than a half-dozen stops at polling places, Foley seemed to be riding a wave of 11th-hour momentum in a race the pollsters deemed "too close to call."

A buoyant Mark Boughton, Foley's running mate as the GOP candidate for lieutenant governor, arrived at the Hyatt shortly after 7, and declared, "let's open the machines and start counting."

Boughton, the Danbury mayor, said he expected turnout in his home city to run to 52 to 53 percent, slightly higher than in the last midterm elections in 2006.

"I like the turnout," Boughton said. "We're getting the vote out. The Republican Party has a lot of layers."

Foley, standing alongside his wife, Leslie, outside a Fairfield polling place at midday, discounted the notion that his chances had been boosted over the last week by a "surge" among independent voters switching allegiances.

"I don't think of it as a surge," he said. "I don't think independents really form an opinion until the last two weeks of a race - they don't have to, they don't have primaries. As the election gets close, they start thinking about the issues and the candidates' positions."

Foley said he's believed all along that most independent voters would gravitate toward an "outsider" with business experience rather than a "career politician," a reference to Malloy, the former Stamford mayor.

Foley said he voted for Republican candidates when the polls opened in his hometown of Greenwich, then boarded his campaign bus for stops at polling places in Danbury, Newtown, Oxford, Trumbull, Fairfield, Norwalk and Stamford before returning to Greenwich.

"More Jobs, Not More Taxes," read the slogan on his bus.

One more stop for Malloy

Malloy had three stops scheduled in Glastonbury to end a day of stumping, including at the Smith Middle School. There, supporter Jim Noonan stood on the sidewalk beside a large Malloy sign and said he was confident his man would show.

Malloy is admittedly superstitious, Noonan said, relaying an anecdote about the candidate explaining once why he always wears green ties. Malloy showed up at Smith during the primary - in which Malloy was also down 3 percentage points - and he would undoubtedly show again, Noonan said.

But somehow, Malloy didn't show. Instead, he skipped the Smith stop for a nearby elementary school and the Glastonbury Town Hall.

When asked about superstition and missing his appearance at Smith, Malloy paused.

"Maybe we should go there," he said, turning to his field representative. "How long does it take?"

After shaking hands in front of the town hall, his supposed last stop, Malloy's team headed for one more: Smith.

It wasn't superstition, his field rep assured. The man simply works hard, and he wouldn't let up until the last possible minute.

Back at Smith, Noonan debunked such stories. Malloy knew better than to skip Smith Middle School - and besides, Noonan said, Malloy's wife told him "We have to go back there."

"First thing, he got out of the car and said, 'I'm here,'" Noonan said.

b.hallenbeck@theday.com

k.crompton@theday.com

Tom Foley appears at his to make a statement that his gubernatorial race against Malloy is to close to call during his election night party at the Hyatt Regency in Greenwich, Conn. Tuesday, Nov. 2, 2010.

Foley supporters cheer as the Foley/Malloy race results showing Foley ahead late in the evening appears on the television screen during Republican gubernatorial candidate Tom Foley's election night party at the Hyatt Regency in Greenwich, Conn. Tuesday, Nov. 2, 2010.