WASHINGTON – California Rep. Katie Hill gave her last speech on the House floor Thursday after announcing her resignation would be effective Friday.

Hill, a freshman Democrat representing California's 25th district, resigned following allegations she had an inappropriate sexual relationship with staffers.

Speaking to a near-empty chamber, Hill apologized to her supporters for mistakes she said will haunt her.

"To those who felt like I gave them hope in one of the darkest times in our nation's history, I’m sorry," Hill said.

Hill has denied the claim that she engaged in a sexual relationship with a congressional aide, but has acknowledged she had a relationship with a campaign staffer, apologizing and saying the relationship happened "despite my better judgement."

The claims originated on a conservative blog earlier this month, along with nude photos of the congresswoman. Sexual relationships between members of the House and their subordinates violate Congressional rules, and the House Ethics Committee had begun an investigation into the claim.

A double standard?:Katie Hill's resignation is about much more than an alleged affair and explicit photos

Hill urged other women not to be discouraged and called on them to continue running for office and "stepping up as leaders." She recognized she bears responsibility for her actions but pointed to a culture she sees as misogynistic.

"I'm leaving now because of a double standard," Hill said, adding, "I’m leaving, but we have men who have been credibly accused of intentional acts of sexual violence and remain in board rooms, in the Supreme Court, in this very body and worst of all in the Oval Office.”

Her speech on the floor came after the House voted to approve a resolution that establishes procedures for the next phase of the impeachment inquiry into President Donald Trump. Hill voted for the resolution.

“I’m leaving because there is only one investigation that deserves the attention of this country, and that’s the one that we voted on today," Hill said.

Members exchanged embraces with Hill on the floor after the vote. Before Hill gave her speech, Speaker of the House Nancy Pelosi gave remarks to reporters and called Hill an "absolutely outstanding young public servant."

"Regardless of any errors in judgment that anyone may have made, it's shameful that she's been exposed to public humiliation by way of cyber exploitation," Pelosi said.

Massachusetts Rep. Ayanna Pressley handed Hill a T-shirt that reads "If you're not outraged, then you're not paying attention."

As Hill walked out of the U.S. Capitol for the last time as a member of Congress, she told reporters she was planning her next steps and said the controversy wouldn't put a halt to her political career. Hill said many had asked her not to resign.

"She was very surprised, and she asked me to stay longer," Hill said of her phone call with Pelosi. "I had a number of people call me and ask me to reconsider."

But Hill said she'd made up her mind and it was why she moved quickly to publicly announce her departure. "I feel like if you decide something, especially like this, then you just got to be able to move forward."

She said she's been living by a quote her mother sent to her: "When something goes wrong in your life, you just have to stand up and say 'plot twist' and move on. That's kind of where I'm at."

She said her colleagues were "tremendously supportive" and said they were "with me and that they expect to see me again in some way, shape or form."

Contributing: Deborah Berry, Christal Hayes