Two ships blew a previous Navy deployment record out of the water on Thursday by remaining at sea for 161 days straight to limit crew members' exposure to the coronavirus.

The aircraft carrier USS Dwight D. Eisenhower, nicknamed Ike, and its guided-missile cruiser USS San Jacinto departed their home base in Norfolk, Va., on January 17 for training missions and deployments. As the COVID-19 pandemic ramped up three months later, they were ordered to not dock at any of the ports overseas.

The difficulties presented with extended periods at sea include not allowing crew members to rest on land, and not letting experts and technicians on to perform repairs.

NAVY WILL NOT REINSTATE CAPTAIN WHO SOUNDED ALARM ON CORONAVIRUS

To accommodate for the changes, sailors participated "in a 'rest & reset' period at sea, coming off-station for a short period of time to allow the crew to relax and reenergize with morale events such as swim calls and steel beach picnics," the Navy said in a statement.

Sailors participate in a steel beach picnic on the flight deck of the aircraft carrier USS Dwight D. Eisenhower on June 6, 2020.
(Mass Communication Specialist Seaman Brennen Easter/U.s. Navy via AP)

Sailors planned "Waffle Saturdays," "steel beach picnics" -- where sailors are allowed to wear civilian clothes and barbecue on the flight deck -- hosted cigar socials with jazz music and got competitive with slam dunk basketball contests, sailors told the Associated Press in an interview.

On the San Jacinto, sailors substituted a mustache contest for the March Madness tournament. The 64-person bracket competed to see who could grow the ugliest mustache.

Sailors participate in sporting events on the flight deck of the aircraft carrier USS Dwight D. Eisenhower on June 6, 2020.
​​​​​​​(Mass Communication Specialist Seaman Brennen Easter/U.S. Navy via AP)

"Our ships remain undeterred in the face of adversity and this monumental feat will only make our crews and the Navy stronger," Capt. Kyle Higgins, USS Eisenhower commanding officer, said in a statement. "I'm so proud of the young men and women I see on the deck plates each and every day. Their dedication to the mission is what makes our Navy the greatest fighting force the world has ever seen."

"While all deployments bring challenges, especially ones of record-breaking duration, they also bond Sailors together through shared memories that last a lifetime," the Navy statement said.

CLICK HERE FOR THE FOX NEWS APP

Despite the COVID-19 restrictions, both ships' crews have remained mission ready.

Sailors assigned to the guided-missile cruiser USS San Jacinto pose for a photo on May 17, 2020, during a swim call in the Persian Gulf. (Mass Communication Specialist 2nd Class Maxwell Anderson/U.S. Navy via AP)

The ships' records surpass that of the aircraft carrier USS Theodore Roosevelt, which operated for 160 days straight in support of post-9/11 response in February 2002.

This isn't Ike's first record though -- in 1980 the ship held the record of 152 days consecutively underway during the Iran hostage crisis.

The Associated Press contributed to this report.