Rear Adm. Robert Gilbeau enters the federal courthouse in San Diego on June 9, 2016. (Lenny Ignelzi/AP)

— A former admiral was sentenced to 18 months in prison Wednesday for lying to federal agents about his part in the worst corruption scandal in Navy history, making him the highest-ranking officer convicted so far in an investigation that has ensnared more than 200 people.

Robert J. Gilbeau, 56, became the first active-duty admiral ever to be convicted of a felony when he pleaded guilty last year in U.S. District Court here. At a hearing Wednesday, his voice broke slightly as he offered a public apology just before he was sentenced by U.S. District Judge Janis L. Sammartino.

“I am proud of my Navy career and proud to be an American,” said Gilbeau, who has since retired. “To the Navy, I want to say I am sorry.”

In a letter to the court, Adm. William F. Moran, the vice chief of naval operations, blasted Gilbeau, saying he had inflicted “immeasurable damage” upon the service and “grossly dishonored his uniform and betrayed his fellow shipmates, the United States Navy and his country.”

An estimated 30 other admirals remain under scrutiny for possible criminal or ethical violations in the corruption case, Navy officials have said.

Prostitutes, vacations and cash: The Navy officials ‘Fat Leonard’ took down

All have come under investigation for their ties to Leonard Glenn Francis, a Singapore-based defense contractor who has pleaded guilty to bribing scores of Navy personnel with prostitutes, cash, luxury goods, top-shelf alcohol and extravagant meals — paid for by millions of dollars in illicit profits that he gouged from the Defense Department.

The scandal has rocked the Navy since the first arrests were made four years ago. Ten Navy officials have pleaded guilty and nine others have been charged with corruption-related offenses in federal court. Justice Department officials say the investigation continues to snowball and more indictments are possible.

In addition, the Navy is pursuing its own investigations into about 200 uniformed personnel for possible violations of military law that could result in criminal or disciplinary proceedings.

In a plea agreement, Gilbeau admitted to lying to federal agents about the nature and extent of his relationship with Francis, a longtime Navy contractor known as “Fat Leonard.” Prosecutors said the pair met 20 years ago during a port visit in Bali, Indonesia, and that Francis immediately began supplying the officer with prostitutes, lavish dinners and stays in hotel suites.

Over the years, Francis learned that Gilbeau particularly liked to have sex with Vietnamese women — two at a time — so he provided the Navy officer with pairs of prostitutes on at least three occasions, according to federal authorities and others familiar with the case.

Prosecutors also alleged that Gilbeau, a Navy Supply Corps officer, pocketed $40,000 in cash kickbacks from Francis as part of a scheme to overcharge the Navy for pumping wastewater from its ships. Gilbeau has denied the accusation.

In a letter to the court, Gilbeau did not address his interactions with Francis but said his misconduct stemmed from post-traumatic stress, survivor’s guilt and a head injury he suffered as a result of a mortar attack in Iraq in 2007. He was awarded the Purple Heart for his wounds.

“I am devastated by the situation I currently find myself in,” he wrote. “I do not desire a defense of my charges based on mental illness, but I do ask that this horrible condition that I suffer is taken into account as a potential mitigating factor.”

Gilbeau’s attorneys said that he still receives intensive psychiatric treatment. To ease his anxiety, doctors prescribed him a therapy dog, a fluffy white Cavachon crossbreed named Bella.

The 16-pound animal accompanied Gilbeau into the courtroom Wednesday and was given its own chair at the defense table.

Defense attorney David Benowitz said that the dog was trained to calm Gilbeau by climbing in his lap whenever it sensed a spike in his blood pressure or anxiety level. He said Gilbeau would be deprived of the animal if he was sentenced to prison.

As if on cue, Bella perched in Gilbeau’s lap a few minutes later.

His attorneys argued that he didn’t deserve to go to prison, while prosecutors pressed for an 18-month sentence.

In court papers, prosecutors suggested that Gilbeau was exaggerating his condition and that his psychiatric problems stemmed from his “regret over being caught.”

They said he began exhibiting overt symptoms of mental illness only in 2013 — right after news spread that Francis and several Navy officials had been arrested on corruption charges.

At the time, Gilbeau held a key command job in Afghanistan overseeing the logistical withdrawal of U.S. troops. When Francis’s arrest became public, Gilbeau began acting irrationally, showed signs of paranoia and became suicidal, according to his medical records.

Under the terms of his plea deal, Gilbeau agreed to pay $150,000 in fines and restitution. He was allowed to retire from the Navy in October, but not before officials demoted him from rear admiral to captain. The Navy also slapped him with an “other than honorable” discharge — a black mark on his military record.

Despite those setbacks, he retained his rights to a military pension that pays him almost $10,000 a month.

Whitlock reported from Washington.