Updated

A U.S. Navy sailor who was presumed lost at sea – but had actually been hiding in the engine room of his ship the entire time – was charged last week with dereliction of duty.

Petty Officer 3rd Class Peter Mims, who was working on the USS Shiloh, admitted last week he actively avoided searches while military officers were looking for him, 7th Fleet spokesman Lt. Paul Newell told Fox News.

Mims, 23, was reported missing June 8 while the ship was near Okinawa, Japan, sparking a wide ocean search. He was thought to have gone overboard.

MISSING NAVY SAILOR FOUND IN SHIP'S ENGINE ROOM REPORTEDLY FACES COURT-MARTIAL

Military officials said they spent 50 hours searching for him in an area that covered 5,500 square miles. The search was suspended three days later, but the crew continued looking for him onboard the vessel.

Crew members were planning a memorial service for Mims when he was found in the engine room on June 15, according to Stars and Stripes.

9a60394a-uss shiloh

The sailor was presumed lost at sea – but had actually been hiding in the engine room of the USS Shiloh, shown here. (U.S. Navy photo by Mass Communication Specialist 1st Class Abraham Essenmacher)

After Mims was found, he was placed in pre-trial confinement but released a week later. He was then assigned to the Naval Surface Force, Pacific Fleet in California. It’s unclear what his duties are, but he will be assigned there until his case is adjudicated.

US NAVY SAILOR PRESUMED LOST AT SEA IS FOUND HIDING IN SHIP'S ENGINE ROOM

Mims faced an admiral’s mast on July 13, according to the Navy Times. He was charged with abandoning watch and dereliction of duty. He could be discharged – though military officials have not said what actions would be taken against him.

“We are not disclosing any of the punitive actions taken against him,” Newell said. "However, I can say that Mims is facing possible further administrative action."

Mims joined the service in February 2014 and had served aboard the Shiloh since August 2014. His awards included the Navy and Marine Corps Achievement Medal.