San Diego  The first guilty plea was entered in San Diego federal court Tuesday in the Navy bribery investigation that has entangled high-ranking Navy brass and uncovered a trail of prostitutes and cash that authorities say leads back to a Malaysian contractor.

John Beliveau II, a supervisory agent for the Naval Criminal Investigative Service, pleaded guilty to conspiracy to commit bribery and bribery, 13 weeks after his arrest in Virginia.

“I’m here to do the right thing, the honorable thing,” Beliveau, 44, said outside the courtroom, adding that his actions were a “catastrophic mistake.”

Beliveau spent four years stationed in Singapore, where he met incoming ships to ensure force safety. In 2010, he garnered top honors as NCIS Agent of the Year. At the same time, he was enjoying all the benefits of being befriended by Navy contractor Leonard Francis, who showered him with prostitutes, lavish dinners, and access to exclusive nightclubs and entertainment — tabs that routinely ran into the thousands of dollars, according to the plea agreement.

In 2011, Beliveau started leaking information on the Navy’s criminal investigation into the allegations of bribery between Navy officials and Francis, who owns the Singapore-based Glenn Defense Marine Asia. In return, the contractor known as “Fat Leonard” provided gifts of prostitutes, cash and luxury travel, the plea agreement states.

At least five of those payments were made with handoffs of cash in envelopes during Beliveau’s travels in Southeast Asia, according to the plea agreement.

Investigators uncovered more than 1,100 text messages between the two men, who also used covert, shared email addresses and Skype to discuss their agreements, court records state. In emails, they appear to discuss their quid pro quo relationship.

“I will always be your friend ... but you will get nothing else ... until I get what you promise. ... You give whores more money than me;),” Beliveau wrote Francis, according to court records.

Francis answered that a gift would be forthcoming, but it was never sent, as the two couldn’t figure out how to best transfer the money secretly, the documents say.

In a 2011 exchange before an apparent trip to Thailand, Francis sent a picture of an escort and asked, “Joyce your kinda babe?”

Gretchen von Helms, one of Beliveau’s attorneys, said the agent played a minor role in the larger scheme and she hopes a judge will consider that when it comes time for sentencing, which may not happen until June.

“The mistake was engineered by Francis. He knows a man’s weakness and exploited him for it,” von Helms said outside the courtroom.

There was no stipulated sentence as part of the plea deal, but von Helms said prison time will likely be imposed. Beliveau faces up to 20 years in prison.

With the plea deal, it is unknown if Beliveau will cooperate with the government in its case against Francis, 49, and other Navy officials. Both defense attorneys and prosecutors have declined to comment on that.

Cmdrs. Jose Luis Sanchez, 41, and Michael Misiewicz, 46, also face the same conspiracy charge on accusations that they helped push Navy ships to Southeast Asia ports Francis controlled and provided him with knowledge of the Navy’s contracting needs and strategies. Francis’ company provides husbanding services for Navy ships, such as fuel, water, security and food. Again, cash, travel and prostitutes were given in exchange, prosecutors say.

Both commanders have worked in the Southeast Asia region at one point. Beliveau was stationed in Japan, then Singapore, before being transferred to a new position at Quantico, Va., in 2012. There, he oversaw eight special agents and all investigations based out of the Quantico office.

Within the 225 documents that Beliveau looked up relating to the larger bribery investigation were names of cooperating witnesses, planned future law enforcement actions and interviews, as well as areas of Francis’ operation that investigators saw as problematic, such as bank and email accounts, documents say.

Not only did Beliveau pass on those hundreds of pages of reports to Francis, but he also advised him how to stall and thwart investigators, the documents say.

Once investigators caught onto the breach, they planted false documents in the NCIS files on the investigation, hoping Beliveau would feed the misleading information to Francis, said Assistant U.S. Attorney Robert Huie.

The last time Beliveau accessed the files was on Sept. 9 — one week before Francis’ scheduled trip to San Diego to meet with Navy officials for a presentation, the plea agreement states. The trip was a ruse, and Francis was arrested at his downtown San Diego hotel after the presentation.

“This is an audacious violation of law for a decorated federal agent who valued personal pleasure over loyalty to his colleagues, the U.S. Navy and ultimately his country,” U.S. Attorney Laura Duffy said in a statement Tuesday.

The investigation continues to widen and has so far ensnared other Navy officials in internal probes. Francis’ cousin, Alex Wisidagama, 40, a manager for his company, has also been charged with fraud on accusations that he overbilled the Navy for services. Prosecutors have indicated they may file similar fraud charges against Francis.

Prosecutors put the overall loss to the Navy at $7 million in connection to the scheme.

Both Wisidagama and Francis remain jailed in San Diego, while the two other Navy members are free on bond. They have all pleaded not guilty.