Ned Lamont, a wealthy businessman whose prior bid for governor fell short, won the Democratic nomination in the Connecticut primary on Tuesday, handily beating his sole opponent according to The Associated Press, and sounding buoyant about keeping the governorship in Democratic hands.

Democrats also chose Jahana Hayes in the state’s Fifth Congressional District, the A.P. reported. Ms. Hayes, a “National Teacher of the Year” in 2016, is seeking to become the state’s first black Democrat to serve in Congress.

Ms. Hayes, 46, was thought to be a long-shot in the contest against Mary Glassman, a longtime local Democratic politician in the Western Connecticut region. But she embraced her status as an underdog, melding her life story — growing up in Waterbury, Conn., she went through homelessness, a teen pregnancy and economic hardship — into her campaign.

She also won support from some of the same progressive organizations that supported insurgent progressive Democratic candidates like Alexandria Ocasio-Cortez, who defeated Representative Joseph Crowley in a New York primary. Ms. Hayes will face the Republican Manny Santos, a former mayor of Meriden.