In this Dec. 4, 2017, file photo, the future USS Michael Monsoor leaves Bath Iron Works for sea trials in Bath. Credit: Robert F. Bukaty | AP

Navy shipbuilder Bath Iron Works and its largest union have agreed to extend the contract for shipbuilders through June 21, officials said Wednesday.

The shipyard said the focus needs to be on keeping workers safe while production continues during the coronavirus pandemic. The current contract with Machinists Union Local S6 had been due to expire on May 17.

“Our daily focus must not waiver from the health and economic security of our workforce and our work for the U.S. Navy,” the shipyard said in a statement posted on its website.

The union and the shipyard have been at odds in recent weeks over worker safety during the pandemic.

Some workers and political leaders suggested a temporary closure of the shipyard because of the coronavirus, but the shipyard is continuing operations because it’s deemed to be essential by the Trump administration.

The shipyard builds destroyers for the U.S. Navy.