A former Navy machinist mate who admitted taking photos inside a nuclear submarine was sentenced to a year in prison Friday, with a federal judge rebuffing a request for probation in light of authorities deciding not to prosecute Hillary Clinton for mishandling classified information on a private email server as secretary of state.

Kristian Saucier’s attorneys argued in a court filing last week that Clinton had been "engaging in acts similar to Mr. Saucier" with information of much higher classification. It would be "unjust and unfair for Mr. Saucier to receive any sentence other than probation for a crime those more powerful than him will likely avoid," attorney Derrick Hogan wrote.

U.S. District Judge Stefan Underhill sentenced Saucier to one year in prison and a $100 fine, along with six months home confinement, 100 hours of community service and a ban on owning guns, his legal team says. Prosecutors had asked for six years behind bars.

"We're very pleased," says Greg Rinckey, another defense attorney for Saucier.

Although relieved, Rinckey does say that "it could be argued here that depending on what your name is, that's the type of justice you get in the United States."

Rinckey says he's not sure if the judge was swayed by significant media attention comparing Saucier's case with the Clinton email controversy.

"He cryptically made some comments about selective prosecution and how that didn't play any factor. Do I think it may have? Sure. But I think there was enough mitigation that the judge was able to depart from the sentencing guidelines [on that basis alone]," he says.

Saucier pleaded guilty earlier this year to one count of unlawfully retaining national defense information after taking six photos inside the USS Alexandria with his cellphone in 2009. Saucier said he intended to show them to his future children, but prosecutors said they doubted that was true.

The photos were deemed “confidential,” the lowest level for classification.

By contrast, an FBI investigation found Clinton’s private email server contained at least 110 emails with classified information. The probe found eight email chains with "top secret" information, 36 with "secret" information and eight with confidential information.

Clinton was not charged with a crime, but FBI Director James Comey said last month her conduct was "extremely careless." Comey also said three emails on Clinton's private server contained markings indicating they contained "confidential" information.

One key difference between the cases: Saucier, 22 years old when he snapped the photos, admitted he knew he was not supposed to have taken them. Clinton, meanwhile, has insisted she did not knowingly send or receive classified information.

Comey said no prosecutor would bring a case without a knowing violation of the statute Saucier admitted violating, which includes provisions requiring either "gross negligence" or "intent ... that the information is to be used to the injury of the United States."

Although Clinton's emails were removed from her private servers, authorities have not alleged that was part of any cover-up, as was alleged against Saucier, who in pleading guilty avoided an obstruction of justice charge while admitting he had destroyed a laptop, a camera and a memory card after he was first interviewed by authorities in 2012.

Saucier's downfall began when a local dumpyard manager found the sailor's old cellphone and told a friend about the submarine photos, leading to an investigation by the the Naval Criminal Investigative Service.

In arguing for a harsh punishment, prosecutors said defendants in similar cases had fully cooperated with authorities. Rear Adm. Charles Richard asked the court in a July letter to give a stiff penalty, partially as a deterrent to others.

But Saucier's former shipmates have described the prosecution as disproportionate when compared against penalties for others who took photos with their phones on the submarine.

Gene Pitcher, a former sailor who worked with Saucier, told Politico earlier this year that two colleagues had been punished with demotions after taking photos inside the USS Alexandria's engine room.

“I just don’t think it’s fair,” Pitcher told Politico. “In reality, what [Clinton] did is so much worse than what Kris did. ... I think it’s just a blatant double standard.”

Scott Nelson, Saucier's chief petty officer aboard the Alexandria through mid-2009, wrote a letter to the court that the order had collapsed aboard the submarine.

"There was no real discussion of legal ramifications of minor security violations, nor was there any significant enforcement of policy for most minor mistakes," Nelson wrote, adding that typical punishments including demotion or pay loss "could also be suspended at the commanding officer's discretion for sailors with great potential to overcome the mistake, as was the case with our sailor of the year who received a DUI."