Acting Navy secretary Thomas Modly boarded one of his service’s executive jets Monday to visit Guam — a trip that turned out to be costly for both him and U.S. taxpayers.

For Modly, the visit resulted in his resignation, after he created an uproar by insulting the former commanding officer of the USS Theodore Roosevelt, who had raised concerns about how the Navy was handling a coronavirus outbreak on the warship.

For taxpayers, the cost of the flight alone was at least $243,151.65, according to a Navy estimate.

The figure was based on 35 hours of flight time to and from Guam, with refueling in Hawaii. Modly traveled on a C-37B at a cost of about $6,946.19 per hour, according to the estimate, which was obtained by The Washington Post. The jet is a military version of the Gulfstream G550.

The detail emerged as the fallout from Modly’s recent decisions continued. The drama began when he removed Navy Capt. Brett Crozier, the Roosevelt’s captain. Last week, Crozier wrote a letter to Navy leaders requesting that 90 percent of his 4,800-sailor crew be temporarily removed from the ship in Guam to allow for coronavirus testing and quarantining.

Modly boarded the flight to Guam after videos appeared online Friday showing sailors cheering Crozier as he left the ship.

Using the ship’s loudspeaker, Modly told the crew that Crozier had written the letter — which leaked to the San Francisco Chronicle last week — to create a public stir or was “too naive or too stupid” to command the ship.

The comments were recorded by sailors and also leaked, prompting calls for Modly’s resignation from some Navy families and Democratic lawmakers. As of Wednesday, 286 members of the crew had tested positive for the virus. Crozier is among them.

The Navy’s top officer, Adm. Mike Gilday, released a message to sailors Wednesday acknowledging that it has been a difficult week for the service.

“We will learn from them,” he said of the recent events. “But make no mistake, we are moving forward. The Navy has our orders and we are executing them.”

Gilday, chief of naval operations, detailed some of the Navy’s missions and said that remaining ready for them is a part of the service’s job.

“Nobody sits the bench. Everyone must pull together,” Gilday wrote. “And in this new environment of coronavirus, we’re all learning, adapting, and improving by the hour. There is no better example of this than USS THEODORE ROOSEVELT — staring down an invisible enemy — dedicated in their efforts — making phenomenal progress, and providing lessons for the Navy and beyond.”