R. Kyle Alagood is a lawyer and political science professor in Erie, Pennsylvania. The opinions in this article are those of the author.

Manning has served more than six years of an excessive thirty-year sentence. Throughout her incarceration, the federal government has proven itself unequipped to humanely incarcerate a transgender woman -- even as the Obama administration has reformed military policies to be more inclusive of transgender people and attempted to advance LGBT rights abroad.

Manning has suffered immensely, as has the nation's reputation. As a result of the way she has been treated, the United Nations special rapporteur on torture accused the United States of cruel, inhuman, and degrading treatment.

Manning's trial revealed she had been struggling with gender dysphoria and suffering mentally and emotionally while deployed in Iraq. For years after her arrest, the military denied her treatment for gender dysphoria. Manning has had to go on hunger strike for medical care and access to gender dysphoria medication, Manning's lawyer told CNN.

Although Donald Trump has proclaimed some openness to transgender rights, some of those he has tapped to administer government are openly hostile to LGBT rights , making it highly unlikely the Trump administration will treat Manning better than Obama has and risking further allegations that the US government is violating human rights at home.

Moreover, the former soldier's leak of more than 700 thousand State and Defense Department files onto the internet via Wikileaks in 2010 strengthened democracy by shedding light on the nation's conduct around the globe. Manning exposed the horrifying video of a US helicopter in Baghdad killing a dozen people, including two Reuters journalists. She revealed that the U.S. government had allowed Iraqis to torture detainees and trained Egyptian police linked to torture, among other things.

To be fair, Manning dumped government files onto the web without filters or redactions. Her actions were irresponsible and endangered the lives of informers she outed. But as Brig. Gen. Robert Carr testified at Manning's sentencing that no lives had been lost and no reprisals had occurred due to Manning's actions.

JUST WATCHED Oliver Stone on 'Snowden,' Putin and DNC hacking Replay More Videos ... MUST WATCH Oliver Stone on 'Snowden,' Putin and DNC hacking 08:47

The human rights implications and merits of her case favor a Manning pardon. For Edward Snowden, realpolitik is an additional factor that urges Obama to use his pardon power.

Snowden's forced exile in Russia is an international relations and publicity nightmare for the US. The Obama administration revoked Snowden's passport mid-flight, stranding him at an airport in Moscow. Its dogged pursuit of charges under the Espionage Act -- a World War I law aimed at punishing foreign spies -- has made Snowden an international celebrity. The longer he remains abroad and under the threat of decades in jail, the less Snowden will seem like a security risk and the more he will appear to be a heroic political dissident.

Although the Obama administration has said it would not seek the death penalty for Snowden, there are few, if any, barriers stopping the Trump administration from seeking death-penalty-eligible charges against him. The mere threat of execution will cement Snowden's martyrdom and weaken the country's bargaining position as it pursues human rights reform abroad.

Time has shown that Snowden's leak was a public service. The former outed surveillance programs that had allowed the US government to scoop up entire swathes of the internet, digital communications, and phone traffic, including metadata on millions of innocent people.

Unlike Manning's indiscriminate dump of unredacted information onto the web, Snowden turned over his information to journalists. In doing so, he allowed the process and ethics of journalism to filter the leaked documents, publish only those that were in the public interest, and give the government an opportunity to push for redactions or withholding of truly harmful documents.

Without the data Snowden released, newspapers and the American people would have gone years without learning of the intelligence community's abuses and excesses. After all, the congressional intelligence committees knew about many of the programs Snowden exposed. They did not act.

JUST WATCHED Meet the people who hid Snowden Replay More Videos ... MUST WATCH Meet the people who hid Snowden 03:11

Even the White House National Security Staff and internal watchdogs in the intelligence community had only limited success in curbing excessive spying. As President Obama's first Director of Privacy and Civil Liberties for the White House National Security Staff put it : "It took Snowden to spark meaningful change ... Snowden forced the NSA to become more transparent, more protective of privacy—and more effective." After leaving office, even Attorney General Eric Holder conceded that Snowden "actually performed a public service by raising the debate that we engaged in and the changes that we made."

Snowden's leak led to important surveillance reforms. A bipartisan group in Congress successfully reformed the Patriot Act to end the collection of domestic phone call metadata. President Obama implemented the country's first-ever directive recognizing privacy interests of foreigners. And internet companies have begun to push back against spy agency demands for users' data.

Follow CNN Opinion Join us on Twitter and Facebook

Even if Manning and Snowden do not deserve pardons for serving the public interest, the American people deserve to be free from the international embarrassment caused by the two cases.

The government has failed to show compassion toward Manning, undermining the United States' call for better treatment of LGBT people around the world.

The Obama administration has exiled Snowden to Russia, thereby fueling his celebrity and tarnishing the US image of political tolerance. Manning and Snowden are blemishes on President Obama's record, but they need not remain bruises on the nation's international reputation.

President Obama should suck it up and pardon both leakers before the incoming administration makes two ugly situations uglier.