Updated

A Democratic Colorado state senator resigned Wednesday to avoid a possible recall election over a controversial gun control law that led to the ouster of two of her colleagues earlier this year.

Sen. Evie Hudak, who has represented a district that includes Denver’s western suburbs since 2008, announced her resignation less than a week before opponents planned to submit petitions to recall her.

Calling the decision “difficult,” Hudak said she decided to resign to protect the new gun control legislation and to ensure her constituents would not have to pay for a special election.

“Though it is difficult to step aside, I have faith that my colleagues will honor the legacy my constituents and I have built,” she said in her resignation letter to the Colorado Senate.

The recall efforts came after Colorado's Democratic Legislature and governor last year approved a slate of gun-control measures including ammunition magazine limits and expanded background checks. The limits were the first adopted outside the East Coast after the mass shooting at Sandy Hook Elementary School in Connecticut that left 20 first-graders and six educators dead.

In September, Democratic state Sens. John Morse and Angela Giron were recalled in favor of Republican replacements over their support of the legislation.

KDVR reports that by resigning, Hudak ensures that a Democrat will be appointed in her seat and the party will retain its one-seat majority in the Senate, which they would have lost if Hudak was successfully recalled.

The Associated Press contributed to this report