WASHINGTON (AP) — Hillary Rodham Clinton formally resigned Friday as America's 67th secretary of state, capping a four-year tenure that saw her shatter records for the number of countries visited.

In a letter sent to President Barack Obama shortly before she was to leave the State Department for the last time in her official capacity, Clinton thanked her former foe for the 2008 Democratic presidential nomination for the opportunity to serve in his administration. Clinton said it had been an honor to be part of his Cabinet.

"I am more convinced than ever in the strength and staying power of America's global leadership and our capacity to be a force for good in the world," she said in the letter.

Her resignation will be effective on the swearing-in of her successor, John Kerry, who was to take the oath of office in a private ceremony later Friday.

Clinton pushed through a throng of American foreign service workers who clamored for handshakes and smartphone photos with her and gave an emotional goodbye speech.

She told them to continue to "serve the nation we all love, to understand the challenges, the threats and the opportunities that the United States faces and to work with all our heart and all of our might to make sure that America is secure, that our interests are promoted and our values are respected."

Clinton, however, also left office with a slap at critics of the Obama administration's handling of the September attack on a U.S. diplomatic mission in Libya. She told The Associated Press in an interview Thursday that critics of the administration's handling of the attack don't live in an "evidence-based world," and their refusal to "accept the facts" is unfortunate and regrettable for the political system.

Clinton told the AP that the attack in Benghazi was the low point of her time as America's top diplomat. But she suggested that the furor over the assault would not affect whether she runs for president in 2016.

Although she insisted that she has not decided what her future holds, she said she "absolutely" still plans to make a difference on issues she cares about in speeches and in a sequel to her 2003 memoir, "Living History," that will focus largely on her years as secretary of state.

Story continues

Clinton spoke to the AP Thursday in her outer office on the seventh floor of the State Department less than 24 hours before she walks out for a final time as boss. She was relaxed but clearly perturbed by allegations from Republican lawmakers and commentators that the administration had intentionally misled the public about whether the attack was a protest gone awry or a terrorist attack, or intentionally withheld additional security for diplomatic personnel in Libya knowing that an attack could happen.

An independent panel she convened to look into the incident was scathing in its criticism of the State Department and singled out four officials for serious management and leadership failures. But it also determined that there was no guarantee that extra personnel could have prevented the deaths of the U.S. ambassador to Libya, Chris Stevens, and three other Americans. Clinton herself was not blamed, although she has said she accepted responsibility for the situation.

"I was so unhappy with the way that some people refused to accept the facts, refused to accept the findings of an independent Accountability Review Board, politicized everything about this terrible attack," she said. "My job is to admit that we have to make improvements and we're going to."

Hours later a suicide bomber linked to a domestic terror group exploded a device just outside the U.S. Embassy in Ankara, Turkey, killing himself and a guard. Clinton told State Department staff on Friday that the attack showed again how "we live in very complex and dangerous times."

Clinton faced a barrage of hostile questions about Benghazi from Republican lawmakers when she testified before Congress recently in appearances that were delayed from December because of illness. Afterward, some lawmakers continued to accuse her and the administration of withholding evidence. Sen. Lindsay Graham, R-S.C., told a television interviewer that he thought Clinton was getting "away with murder."

In the interview, Clinton had little patience for such allegations.

"There are some people in politics and in the press who can't be confused by the facts," she said. "They just will not live in an evidence-based world. And that's regrettable. It's regrettable for our political system and for the people who serve our government in very dangerous, difficult circumstances."

Because of that, she said, the partisan divide should not dissuade anyone with a cause from getting involved in politics, and she hinted strongly that a divisive atmosphere would not stop her in any future endeavor. "You have to have a thick skin because (politics) is just going to be a contact sport as far as we can look into the future."

Clinton is no stranger to partisan politics. As first lady, she railed in 1998 against a "vast right-wing conspiracy" that she asserted had been attacking her husband, Bill Clinton, ever since he had become president.

But the woman who was once considered a divisive figure in American politics, yet leaves office as one of its most popular, remained coy about whether she would run for president in 2016.

"I am making no decisions, but I would never give that advice to someone that I wouldn't take myself," she said. "If you believe you can make a difference, not just in politics, in public service, in advocacy around all these important issues, then you have to be prepared to accept that you are not going to get 100 percent approval."