Elizabeth Esty knew her vote could cost her the next election.

As a freshman state lawmaker in 2009, Esty stepped into the center of the emotional debate over whether to abolish the death penalty. The issue was especially crucial for Esty because she represented Cheshire, the small town where three members of the Petit family were killed by two convicted criminals in one of the most high-profile crimes in recent state history. Emotions ran high following the July 2007 slayings, and Cheshire became ground zero for the state's death penalty debate.

Esty, a Democrat in a Republican-leaning district, said she was "very well aware'' of the political risks when she voted in the General Assembly in May 2009 to abolish capital punishment. The following year, she lost her re-election bid to Republican Al Adinolfi, a proponent of the death penalty who had the backing of Dr. William Petit, the lone survivor of the tragedy.

Esty's state legislative career was suddenly over after only two years.

Now, as she runs for Congress in a nationally watched race in the 5th District, Esty has no regrets.

"If elected members of any body — whether it's a state house or Congress — were not willing to take career-ending or at least election-losing votes, I would not have the right to vote today,'' Esty said in an interview.

Esty said she has strong moral convictions against the death penalty. She worked on two capital punishment cases as a student at Yale Law School and later as an attorney. In addition, she served as the legal adviser for a year-long study on the death penalty.

"I felt it was my obligation to vote for what was best for the state, even if not popular at the time or in my district,'' Esty said. "That allows me to put my head on my pillow at night, and it allows me to face my children. There are things that matter more than your election. That may take difficult votes, may take career-ending votes for people, but if we aren't willing to do that, then we're not going to move forward.''

Esty took that chance on the death penalty and lost in 2010.

She then took another chance when she decided to run in a Democratic primary against the sitting House speaker, Christopher Donovan of Meriden. Some Democrats immediately dismissed Esty's chances as a long shot because she was running against one of the most powerful Democrats in the state. But the race changed sharply when Donovan's finance director was arrested in May, followed by the indictments of seven others in late July in a campaign finance scandal involving an attempt to influence legislation on roll-your-own cigarettes.

"Not one person told me not to run,'' Esty said over lunch at a Danbury restaurant. "Not one. A lot of people said, 'Boy, that's going to be really tough.' Not one person asked me not to run. Not one person told me not to run. Not one.''

When asked if that surprised her, Esty said, "Yes. It also told me my instinct was right.''

Despite the long odds, Esty says now that she thought she would defeat Donovan all along — with or without the scandal.

"I thought I would be a stronger candidate in the general election,'' she said.

Esty won the three-way Democratic primary in mid-August by seven percentage points and is now facing Republican state Sen. Andrew Roraback of Goshen.

One of Roraback's TV commercials harkens back to her hometown of Cheshire — to Esty's days as a PTA mom who was fighting for additional funding for the public schools. All three of her children, who are now grown, with the oldest turning 23 next month, attended public schools.

The ad shows Esty standing up at a town council meeting, advocating for more funding in a community where senior citizens wanted the town fathers to hold the line on property taxes. Esty addresses the taxpayers by saying, "You're always welcome to move to one of our neighboring towns.''

Roraback's 30-second commercial highlights that statement twice and then ends by saying, "It's shameful. It's wrong. It's Elizabeth Esty.''

Esty does not dispute the quote in the commercial, saying the clip was from about 10 years ago at a town council meeting. But she noted that she worked later as an elected member of the town council to find solutions both for young families with children in the public schools and for senior citizens who are struggling to pay their increasing property taxes.

"On the council, we did do a dramatic increase in the senior property tax credit program, and that made a significant difference in people's lives. It's an example of how I'm a problem solver. It's an example of what I do bring to the table.''