Former CIA Acting Director Michael Morell announced his resignation Thursday as a senior fellow at the Harvard Kennedy School of Government over its hiring of Chelsea Manning as a visiting fellow.

"Unfortunately, I cannot be part of an organization — the Kennedy School — that honors a convicted felon and leaker of classified information, Ms. Chelsea Manning, by inviting her to be a Visiting Fellow at the Kennedy School's Institute of Politics," Morell wrote in a letter to the school's dean, Douglas Elmendorf.

"Ms. Manning was found guilty of 17 serious crimes, including six counts of espionage, for leaking hundreds of thousands of classified documents to Wikileaks, an entity that CIA Director Mike Pompeo says operates like an adversarial foreign intelligence service," Morell wrote.

Pompeo said in a letter to Harvard on Thursday that he backed Morell's decision, adding that he was withdrawing from a Harvard public forum later Thursday night.

While I have served my country as a soldier in the United States Army and will continue to defend Ms. Manning's right to offer a defense of why she chose this path, I believe it is shameful for Harvard to place its stamp of approval upon her treasonous actions," Pompeo wrote.

Like Pompeo, Morell stressed that he didn't take issue with Manning's gender identity.

The Morning Rundown Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Former CIA Director Michael Morell speaks at a forum at Harvard University in May 2016. Paul Marotta / Getty Images, file

"It is important to note that I fully support Ms. Manning's rights as a transgender American, including the right to serve our country in the U.S. military," Morell wrote, adding that he opposes President Donald Trump's ban on transgender service members.

"But it is my right, indeed my duty, to argue that the School's decision is wholly inappropriate and to protest it by resigning from the Kennedy School," he wrote.

Manning wasn't the only person announced as a visiting fellow this week. Harvard said former White House spokesman Sean Spicer also had been appointed.

"Broadening the range and depth of opportunity for students to hear from and engage with experts, leaders and policy-shapers is a cornerstone of the Institute of Politics," Bill Delhunt, acting director of the institute, said. "We welcome the breadth of thought-provoking viewpoints on race, gender, politics and the media."

Manning, a former Army intelligence analyst, was convicted of leaking a trove of military intelligence records and spent seven years in prison before President Barack Obama commuted her sentence in January.

Chelsea Manning's first photo after being released from prison. Tim Travers Hawkins / via Chelsea Manning

Manning is appealing her conviction, and the lawyer handling her appeal, Nancy Hollander, disputed Morell's claims that Manning's actions had put the nation in danger.

"There's a quote from Secretary of Defense Gates about how people don't work with the U.S. because they like us or because they trust us, but because they fear us and respect us," she said in a phone interview, referring to Robert Gates, who led the Pentagon under Presidents George W. Bush and Barack Obama. "So maybe at most, the U.S. was embarrassed. They never identified a single person who was harmed."

Hollander said Manning's appointment at Harvard was "terrific for Chelsea and for Harvard and for the students."

"Of course she's not posing harm to anybody anywhere," Hollander said. "She did a public service."

The Harvard Kennedy School did not immediately return a request for comment on Morell's resignation.

Follow NBC Out on Twitter, Facebook and Instagram