Hillary Clinton emerged from political hibernation Tuesday by declaring herself “part of the resistance” to Donald Trump’s presidency — and spreading blame for why it is not her sitting in the Oval Office.

Making a rare public appearance, Clinton attributed her surprise loss in the 2016 election to interference by Russian hackers and the actions of FBI Director James B. Comey in the campaign’s homestretch.

“If the election had been on October 27, I would be your president,” Clinton told moderator Christiane Amanpour, the CNN anchor, at a Women for Women International event in New York.

Clinton stated broadly that she takes “absolute personal responsibility” for her failure to win the White House. Yet the Democratic nominee declined to fault her strategy or message, nor did she acknowledge her own weak­nesses as a campaigner or the struggles by her and her advisers to at first comprehend and then respond to the angry mood of broad swaths of the electorate.

Instead, Clinton attributed her defeat to a range of external ­forces, including saying she was a victim of misogyny and of “false equivalency” in the news media.

1 of 55 Full Screen Autoplay Close Skip Ad × See what Hillary Clinton has been doing since the presidential election View Photos The former Democratic candidate and secretary of state has returned to public life after a post-election-loss respite. Caption The former Democratic candidate and secretary of state has returned to public life after a post-election respite. Jan. 28, 2018 Hillary Clinton appears on screen reading an excerpt from the book, “Fire and Fury,” during a skit at the 60th annual Grammy Awards at Madison Square Garden in New York. Matt Sayles/Invision/AP Buy Photo Wait 1 second to continue.

Clinton said she was confident that she was on track to winning the election until two things reversed her momentum: the release of campaign chairman John Podesta’s emails, which were allegedly stolen by Russian hackers, and Comey’s Oct. 28 letter to Congress that he had reopened the bureau’s investigation into her use of a private email server.

“I was on the way to winning until the combination of Jim Comey’s letter on October 28 and Russian WikiLeaks raised doubts in the minds of people who were inclined to vote for me but got scared off — and the evidence for that intervening event is, I think, compelling [and] persuasive,” Clinton said.

On Nov. 6, two days before the election, Comey wrote again to Congress saying that the FBI had found no new evidence to change its conclusion that Clinton should not face criminal charges.

[How Donald Trump won: An oral history of the 2016 campaign]

Clinton talked about “the unprecedented interference, including from a foreign power whose leader is not a member of my fan club” — referring to Russian President Vladi­mir Putin, with whom she tangled as secretary of state.

In a pair of tweets Tuesday evening, Trump responded to Clinton’s claim that Comey’s statements had a role in her defeat, writing that the FBI director “was the best thing that ever happened to Hillary Clinton in that he gave her a free pass for many bad deeds!”

“The phony … Trump/Russia story was an excuse used by the Democrats as justification for losing the election,” the president wrote, before posing a rhetorical question: “Perhaps Trump just ran a great campaign?”

When Amanpour asked whether Clinton thought misogyny contributed to her loss as the first female presidential nominee, Clinton said, “Yes, I do think it played a role.” She added that sexism “is very much a part of the landscape politically and socially and economically.”

Amanpour tried to draw out self-reflection from Clinton.

“He had one message, your opponent, and it was a successful message: ‘Make America great again,’ ” Amanpour said of Trump. “Where was your message? Do you take any personal responsibility?”

“I take absolute personal responsibility,” Clinton said. “I was the candidate. I was the person who was on the ballot.”

But then Clinton went on to blame Comey and the Russian hack of Podesta’s emails for her loss. “There was a lot of funny business going on,” she said.

Clinton added that she would detail her mistakes in her forthcoming book. “You’ll read my confession and my request for absolution,” she said with a touch of sarcasm.

Robert Shrum, a Democratic strategist who advised two losing presidential nominees, Al Gore and John F. Kerry, said Clinton is not applying enough weight to her own failures, especially her economic message, in analyzing her loss.

“I have a measure of real sympathy, but it is also true that you can’t just blame the things that happened to you,” Shrum said. “Part of credibility here begins with saying, ‘These were things that happened to me that really hurt and could’ve cost me the election, but there were decisions I wish I made differently as well.’ ”

Losing a close presidential race can be devastating, and even traumatic, for a politician who long aspired to the office. After his 2000 defeat, Gore grew a beard and gained weight. Following his 2012 drubbing, Republican Mitt Romney retreated into seclusion in La Jolla, Calif., where he was spotted pumping his own gas, with his hair preternaturally flopping over his forehead.

“When a presidential candidate loses, they usually fall into a deep funk,” said Douglas Brinkley, a presidential historian at Rice University. “They’re overtaken by a sense of personal mistakes that they made, but also trying to blame great external forces that robbed them of the prize.”

By her own acknowledgment, the experience has been no different for Clinton. Day after day, photos popped up on social media of her walking her dogs in the woods near her home in Chappaqua, N.Y. Clinton said Tuesday that she has been keeping busy writing a memoir, due out this fall. She described the process as “cathartic” yet “excruciating.”

“It’s a painful process reliving the campaign, as you might guess,” she said.

[In the Chappaqua woods, a search for Hillary Clinton]

Now, six months after the election, Clinton is stepping back into the public arena. She wants to be heard and to stay relevant, even as her Democratic Party is turning the page on the Clinton era and looks for new figures to lead it out of the political wilderness.

“I’m back to being an activist citizen — and part of the resistance,” Clinton said.

Some Democrats would prefer to lead the resistance themselves.

“She continues to be an important voice, but we’re focused on new battles now,” said Rep. Daniel Kildee (D-Mich.). “I don’t think it’s productive to re-litigate that race. I get up every morning and I’ve got to live with Donald Trump as president.”

But Rep. Keith Ellison (D-Minn.), one of a handful of Democrats who endorsed Clinton’s primary opponent, Bernie Sanders, said that being freed from life as a candidate might change the way voters hear Clinton.

“Maybe she can speak a little more openly now,” Ellison said. “I think it’s a good idea for her to do a book tour, to plug into the energy that’s out there.”

In a 35-minute question-and-answer session with Amanpour, Clinton reprised familiar themes and lines from her campaign. She talked about supporting the aspirations of women and girls, and also weighed in on North Korea’s nuclear ambitions.

“This is one of those wicked problems,” she said. “There has to be a regional effort to basically incentivize the North Korean regime to understand that it will pay a much bigger price regionally, primarily from China, if it pursues this reckless policy of nuclear weapons development.”

Clinton ribbed Trump a few times in the interview, leaving no doubt that she disapproves of his policies as well as his personal conduct. She suggested that Trump should tweet more about her than about foreign affairs, saying, “I’m happy being the diversion.”

“He should worry less about the election and my winning the popular vote than doing some other things that would be important for the country,” Clinton said.

To that point, she was quick to fact-check Trump’s regular commentary about his “historic” election, in which he won the electoral college but lost the popular vote.

“Remember,” Clinton said, “I did win more than 3 million votes [more] than my opponent.”

David Weigel, Aaron Blake and Ashley Parker contributed to this report.