Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A trip to Guam that led to the resignation of acting Navy Secretary Thomas Modly cost $243,000, a Navy official said Wednesday.

Modly resigned Tuesday, shortly after he took a 35-hour trip to the USS Theodore Roosevelt and upbraided the ship's commanding officer, Capt. Brett Crozier. Modly's comments were broadcast over the ship's loudspeakers.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Crozier had sent a letter to Navy officials pleading for help with an outbreak aboard the ship of COVID-19, the disease associated with the coronavirus. The letter leaked to the San Francisco Chronicle, drawing attention to the outbreak and generating a wave of headlines.

The cost of Modly's flight on a Gulfstream 550 was first first reported by USA Today.

Modly relieved Crozier of his command on April 2, saying the captain's letter "unnecessarily raised the alarm of the families of our sailors and Marines." On Monday, in an expletive-laden comment aboard the USS Theodore Roosevelt, Modly excoriated the captain, suggesting that he was "stupid or naïve" for writing the letter and accusing him of a "betrayal of trust."

Download the NBC News app for breaking news and politics

Initially, Modly stood by his comments, but after President Donald Trump offered support to Crozier, Modly issued an apology.

"Let me be clear, I do not think Captain Brett Crozier is naïve nor stupid," Modly said. "I think, and always believed him to be the opposite."

On Tuesday, Modly offered his resignation to Defense Secretary Mark Esper, who said Modly had quit on his own accord, "putting the Navy and the sailors above self so that the USS Theodore Roosevelt, and the Navy as an institution, can move forward."