WASHINGTON — President Donald Trump on Friday pardoned a former sailor jailed for taking pictures of his workstation on a personal cell phone, a case that became entangled with former Secretary of State Hillary Clinton’s own controversies involving mishandling classified information.

Former Machinist’s Mate 1st Class Kristian Saucier pleaded guilty to the crime in 2016 and spent a year in jail. He had petitioned the White House for a full pardon, arguing that federal prosecutors targeted him for overly severe punishment in the wake of revelations that Clinton used a private email server to store classified emails.

“This is not justice” he wrote in a letter to the White House in January 2017.

On Friday, White House spokeswoman Sarah Sanders announced the pardon and said the president was “appreciative of Mr. Saucier’s service to the country,” and said the felony conviction was excessive given his “commendable” military service record.

This jailed sailor blames Hillary Clinton for his sentence — and wants Trump to set him free Former Machinist's Mate 1st Class Kristian Saucier pleaded guilty this summer to charges relating to six pictures of classified spaces he took on his cell phone on the attack submarine Alexandria.

“Mr. Saucier was 22 years old at the time of his offenses and has served out his 12-month sentence,” she said. “He has been recognized by his fellow service members for his dedication, skill and patriotic spirit.”

In court, Saucier acknowledged that he took six photos of his work station aboard an attack submarine in violation of Navy rules. He said the reason was not to jeopardize sensitive information about the vessel, but instead to keep as a memento of his time on board.

Former Machinist's Mate 1st Class Kristian Saucier, shown here during his time in the Navy, was pardoned by President Donald Trump on Friday after serving a year in prison for illegally photographing his work station aboard a submarine. (Courtesy photo)

× Fear of missing out? Sign up for the Navy Times Daily News Roundup to receive the top Navy stories every afternoon. Thanks for signing up. By giving us your email, you are opting in to the Navy Times Daily News Roundup.

But he also noted that two other sailors caught taking similar photos on the same submarine a few years earlier faced a rank reduction and forfeited pay for the actions, not a dishonorable discharge and felony prison sentence like he received.

Saucier’s case became a talking point among conservatives during the 2016 presidential campaign, even though federal prosecutors argued comparisons between his actions and Clinton’s were laughable.

Trump’s pardon removes the felony conviction from Saucier’s record but will not make the former sailor automatically available for military and veteran benefits.

The pardon is only the second issued by Trump since taking office in early 2017. Last August, he awarded a pardon to Joe Arpaio, a controversial former Arizona sheriff, who was convicted of contempt in an immigration case.