NEW YORK — Judith Miller, the New York Times reporter who was first lionized, then vilified by her own newspaper for her role in the CIA leak case, has retired from the Times, the paper announced Wednesday.

Miller, who joined the Times in 1977 and was part of a team that won a Pulitzer Prize in 2002 for reporting on global terrorism, had been negotiating with the paper for several weeks about her future. She is 57.

She spent 85 days in jail over the summer for refusing to testify about her conversations with a confidential source. But after her release, Miller was criticized harshly and publicly by Times editors and writers for her actions in the CIA leak case and for her reporting during the run-up to the Iraq war, later discredited, indicating that Saddam Hussein possessed weapons of mass destruction.

Miller’s lawyers and the paper negotiated a severance package, the terms of which were not disclosed. As part of the agreement, the paper will publish a letter from Miller explaining her position, The Times said on its Web site.

Miller did not immediately respond to an e-mail or answer her telephone.

Lack of support contributed to decision, Miller saysBut in the farewell letter to be published in Thursday’s editions of the Times, Miller said she was leaving the paper partly because some of her colleagues disagreed with her decision to testify in the CIA leak case.

“But mainly,” she wrote, “I have chosen to resign because over the last few months, I have become the news, something a New York Times reporter never wants to be.”

In her letter, partially quoted Wednesday on the paper’s Web site, Miller noted that even before going to jail, she had “become a lightning rod for public fury over the intelligence failures that helped lead our country to war.” She said she regretted “that I was not permitted to pursue answers” to questions about those intelligence failures.

“We are grateful to Judy for her significant personal sacrifice to defend an important journalistic principle,” Times publisher Arthur Sulzberger Jr. said in a statement. “I respect her decision to retire from The Times and wish her well.”

The paper had initially been publicly supportive of Miller, and waged a long and costly legal battle on her behalf after she refused to tell a grand jury about conversations she had with I. Lewis Libby, then chief of staff for Vice President Dick Cheney, about CIA operative Valerie Plame. Plame is the wife of a Bush administration critic.

After Miller ultimately decided to testify, saying Libby had given her permission to do so, the Times ran an article depicting Miller as a rogue reporter who battled with editors and colleagues. In a subsequent staff memo, Times Executive Editor Bill Keller said Miller also appeared to have misled editors about her “entanglement” with Libby.

Miller, who did not immediately return to work for the Times after her release, told The Associated Press in a recent interview that she had been “terribly sad” about the rift.