When he wasn’t serving as a submarine officer, a Navy lieutenant dealt drugs in Seattle, military prosecutors say.

Assigned to the guided-missile submarine Michigan’s Blue Crew, Lt. James W. Hendren, 27, has been charged with distributing cocaine in November and MDMA in July at unnamed locations in the Emerald City, according to charge sheets provided to Navy Times.

Near the submarine’s homeport of Bremerton in January, Hendren allegedly began trying to cover up his illicit moonlighting by deleting web searches for “how to pass a hair follicle test” and “how to delete icloud storage," moves prosecutors believe were designed "to impede and obstruct the due administration of justice.”

Authorities suspect Hendren also tried to influence the potential statements and testimony of an unnamed person, allegedly saying “we can come out of this okay” if the two had a consistent story against a third person whose name is also redacted in the records provided to Navy Times.

Hendren drew another conduct unbecoming charge tied to the alleged Seattle drug deal in July, according to the court filings.

Hendren’s military defense attorney did not respond to requests for comment from Navy Times.

The submarine officer has been held in pretrial confinement since Aug. 23, according to the charge sheets.

Hendren was arraigned Monday at Naval Base Kitsap but no trial date has been set.

Hendren’s service records indicate that he’s originally from Tennessee and was commissioned in 2014 after graduating from Tulane University, where he participated in the Reserve Officer Training Corps.

He reported to the Michigan in late 2015 after studying at the Naval Nuclear Power Training Command and Nuclear Power Training Unit in South Carolina and Naval Submarine School in Groton, Connecticut.