CHARLOTTE, N.C. (AP)  His outstanding career in the military and national security has been ruined; so have his political aspirations, because he provided classified information to his mistress.

But when former CIA Director David Petraeus was sentenced Thursday to two years’ probation and fined $100,000 for what a federal judge called a “serious lapse of judgment,” some argued that he received preferential treatment.

“There is a double standard that has been displayed by the U.S. government that is inequitable, unconscionable and just simply unfair,” said Mark Zaid, a Washington attorney who regularly represents government employees and military members in national security cases.

The sentencing came two months after Petraeus agreed to plead guilty to a federal misdemeanor count of unauthorized removal and retention of classified material.

The plea agreement carried a possible sentence of up to a year in prison. Prosecutors had recommended two years’ probation and a $40,000 fine, but Judge David Keesler increased the fine to “reflect seriousness of the offense,” that stood in “stark contrast to 37 years of achievement.”

Prosecutor James Melendres also addressed the seriousness of the case, saying: “He was entrusted with the nation’s most … sensitive security. The defendant betrayed that trust.”

Appearing calm and wearing a business suit, Petraeus made a brief statement before he was sentenced, apologizing “to those closest to me and others, including this court, for the pain my actions have caused.”

After the sentencing, Petraeus thanked his supporters and again said he was sorry.

The prospect of probation for Petraeus had been raised in an unrelated case by supporters of Jeffrey Sterling, a former CIA officer convicted of giving a New York Times reporter classified details of an operation to derail Iran’s nuclear ambitions.

Federal prosecutors in Virginia have urged a stiff sentence for Sterling, and probation officers have calculated a sentencing guideline range of 20 to 24 years.

Zaid contrasted the Petraeus case with that of his former client, ex-CIA officer John Kiriakou.

In 2012, Kiriakou pleaded guilty to intentionally disclosing the identity of a covert agent to a reporter and was sentenced to 2 1/2 years in prison. Petraeus, then CIA director, hailed the conviction.

Zaid said he believes the government struck a deal with Petraeus to avoid trying such a high-profile former government official.

“It would have been a political quagmire,” he said.

He said that given Petraeus’ earning potential, the penalty isn’t significant. He said the most serious consequence for Petraeus is likely that any political ambitions are derailed.

“Instead of requiring him to make one speech, it’ll require him to make two speeches now, and he’ll earn the money back,” he said.

But Greg Rinckey, a former U.S. Army lawyer in private practice who specializes in military law and security clearance issues, said the punishment sent a message: “It’s not like he walked.”

Plus, Rinckey argued, the scandal has already derailed the career of a retired four-star Army general who led U.S. forces in Iraq and Afghanistan.

“Whenever anyone hears ‘Gen. Petraeus,’ this is what we’re going to be left with: ‘Oh, Gen. Petraeus was the former director of the CIA who leaked information to his mistress,'” he said.

The plea agreement was filed in federal court in Charlotte, North Carolina, the city where Paula Broadwell, the general’s biographer and former lover, lives with her husband and children.

Prosecutors said that while Broadwell was writing her book in 2011, Petraeus gave her eight binders of classified material he had improperly kept from his time as the top military commander in Afghanistan. Days later, he took the binders back to his house.

Those binders were later seized by the FBI in an April 2013 search of Petraeus’ Arlington, Virginia, home, where he had kept them in the unlocked drawer of a desk in a ground-floor study.

Prosecutors said that after resigning from the CIA in November 2012, Petraeus signed a form falsely attesting he had no classified material. He also lied to FBI agents by denying he supplied the information to Broadwell, according to court documents.

Broadwell did not respond to an email seeking comment Thursday, and no one answered the door at her home. Her attorney, Robert Muse, said Thursday that she would have no comment.

Shortly after Petraeus’ sentencing, Broadwell sent out a tweet showing an image displaying a light at the end of the tunnel.

Lawyers who followed the case are interested to see how the Petraeus deal affects future classified information cases.

Zaid said defense attorneys are likely to cite it in arguing for leniency.

“‘I want the Petraeus deal.’ That is now our catchphrase,” he said.

Rinckey agreed that the case could provide leverage for defense attorneys.

“I think that any defense attorney is going to use this and say, ‘Well, wait a minute this is a double standard here. He got leniency, so should my client You can’t give my client jail time on this,'” he said.