Rep. Katie Hill (D-Calif.) on Sunday announced her resignation from Congress amid an ethics inquiry into allegations that she had an intimate relationship with a congressional staff member in her office.

“It is with a broken heart that today I announce my resignation from Congress,” Hill wrote in a statement. “This is the hardest thing I have ever had to do, but I believe it is the best thing for my constituents, my community, and our country.”

Hill’s spokeswoman said that the resignation is not immediate and that Hill is still deciding on when she will leave office. Her announcement was first reported by Politico, which said that she planned to resign by the end of the week.

Last week, the House Ethics Committee opened an investigation into allegations that Hill was romantically involved with her legislative director, Graham Kelly, a relationship that would violate House ethics rules.

Hill was seen as a rising star in the Democratic Party, a 32-year-old lawmaker who flipped a Republican-held seat in a district northeast of Los Angeles.

Her departure came swiftly after allegations surfaced about a week ago in an article on the conservative website The article alleged that Hill and her husband were in a consensual three-person relationship with a woman on her campaign team. The article included text messages it said were between Hill and the woman as well as intimate photos of them together. Hill is openly bisexual.

The article also alleged that Hill was involved romantically with Kelly.

Under House ethics rules adopted last year in response to high-profile sexual harassment claims involving members of Congress, it is against the official code of conduct for members to “engage in a sexual relationship with any employee” who works for the member.

House Speaker Nancy Pelosi (D-Calif.) said in a statement that Hill “came to Congress with a powerful commitment to her community and a bright vision for the future, and has made a great contribution as a leader of the Freshman Class. She has acknowledged errors in judgment that made her continued service as a Member untenable. We must ensure a climate of integrity and dignity in the Congress, and in all workplaces.”

Hill has confirmed that she was in a relationship with the female campaign staffer, according to the Los Angeles Times, but has denied that she had a romantic relationship with Kelly.

“Allegations that I have been involved in a relationship with Mr. Kelly are absolutely false,” Hill said in a statement she released Tuesday. “I am saddened that the deeply personal matter of my divorce has been brought into public view and the vindictive claims of my ex have now involved the lives and reputations of unrelated parties.”

Hill is vice chair of the Oversight Committee, a rare powerful position for a freshman.

Hill’s national profile grew quickly during the 2018 midterms as a formidable challenger seeking to unseat the last Republican seat in Los Angeles County. She became a star fundraiser, raising over $8.3 million for her first House campaign, thanks in part to the backing of wealthy female donors in the Los Angeles area.

In her statement Sunday, she said she is pursuing legal options against those who released private photos, saying that “having private photos of personal moments weaponized against me has been an appalling invasion of my privacy.”

She apologized for “mistakes made along the way and the people who have been hurt.”

Hill has accused Republican operatives and her husband of coordinating a “smear campaign” amid the couple’s pending divorce.

“Now, my fight is going to be to defeat this type of exploitation that so many women are victims to and which will keep countless women and girls from running for office or entering public light,” she said in her statement Sunday.

Hill’s announcement comes ahead of an early filing deadline for the seat — Dec. 6. Democrats argued Sunday night that they would win the open seat next year in a district that Hillary Clinton won by six percentage points in 2016.

“Congresswoman Katie Hill is a dedicated servant who brought an important perspective to our Caucus. I thank her for her service. This evening I told her that I respect her decision and wish her well. There is no doubt that Democrats will continue to hold this increasingly blue and diverse seat, building on Katie’s resounding victory in 2018,” said Rep. Cheri Bustos (Ill.), chairman of the Democratic Congressional Campaign Committee.

Democrats will hold 233 seats after the death of Rep. Elijah E. Cummings (D-Md.) and Hill’s resignation. Republicans have 197 seats after Rep. Sean P. Duffy (R-Wis.) resigned to focus on his family and Rep. Chris Collins (R-N.Y.) stepped down after pleading guilty to insider trading charges.