In an upset, Dannel P. Malloy, a former mayor of Stamford, Connecticut’s fourth-largest city, won the Democratic nomination for governor on Tuesday, defeating Ned Lamont, a multimillionaire businessman who tried unsuccessfully to oust Senator Joseph I. Lieberman four years ago.
His victory sets up a contest with Thomas C. Foley, a prominent Republican fund-raiser and former ambassador under President George W. Bush.
Republicans have held the governor’s office in Connecticut since 1991.
In another closely watched race in Connecticut, Linda E. McMahon, the former chief executive of World Wrestling Entertainment, won the race to be the Republican nominee for the United States Senate seat that Christopher J. Dodd, a Democrat, has held for nearly three decades
Ms. McMahon will face Richard Blumenthal, Connecticut’s popular five-term attorney general, in a general election that could help swing the balance of political power in the Senate. In the governor’s race, Mr. Malloy, in his first bid for statewide office, overcame the nearly $9 million that Mr. Lamont, the founder of a telecommunications company, spent from his own personal fortune.
Gov. M. Jodi Rell, a Republican who has been in office for six years, announced earlier this year that she would not seek re-election. She took office after the resignation of Gov. John G. Rowland, who pleaded guilty to corruption charges. Mrs. Rell, who was lieutenant governor under Mr. Rowland, was elected on her own in 2006.
The race for governor represents a golden opportunity for Democrats, who have not controlled the governor’s office since William A. O’Neill held it from 1980 to 1991 despite the voter enrollment edge their party enjoys in the state.
The race for Mr. Dodd’s seat has drawn national attention, as both parties wage a struggle for control of the Senate.
Ms. McMahon defeated Rob Simmons, a former congressman who suspended his campaign in May only to jump back into the race last month. A third candidate, Peter Schiff, a financier who said he predicted the economic meltdown, was also on the ballot.
The matchup between Ms. McMahon and Mr. Blumenthal, which polls show to be competitive, is on a pace to be among the nation’s most expensive Senate contests. Ms. McMahon, who spent $22 million to capture the Republican nomination, has said she will spend nearly $30 million more in the fall campaign.
While analysts once thought the Democrats had a strong shot at holding the seat in a heavily Democratic state like Connecticut, the race appears to be increasingly competitive for the November elections.
Mr. Blumenthal seemed to have a healthy lead, but the race has narrowed significantly amid reports that he misrepresented his service during the Vietnam War.
In the battle to be the state’s next governor, Mr. Malloy, who received the party’s endorsement, overcame Mr. Lamont’s personal campaign war chest as well as a frustration among voters with the political establishment.
Mr. Malloy came close to being the Democratic Party candidate for governor in 2006. But this time, he had several factors working in his favor, including sagging support among liberals for Mr. Lamont, who campaigned against the Iraq war in 2006 in his bid against Mr. Lieberman. Mr. Lamont positioned himself as a centrist in his bid to become governor.