Ominous storm clouds are forming yet again over Philly Shipyard, the commercial shipbuilding operation in the Navy Yard that taxpayers have rescued twice in the last two decades. The company's order book is empty, and shipowners are buying few new vessels.

The shipyard, whose majority shareholder is Norwegian holding company Aker ASA, has laid off about 250 employees and contractors in recent months, reducing its workforce to 950, as it rushes to complete two 850-foot-long cargo vessels to serve the Hawaii-Pacific market, the largest container ships ever built in the United States.

Layoffs are expected to continue as the completion date for the final ship approaches early next year, as there is no new work in the pipeline.

Steinar Nerbovik, the shipyard's chief executive, said in an interview Tuesday that the company expects to post losses in 2018 and 2019. "But I'm a born optimist," he said. "I think we will have new orders, and I think we will have a bright future. But it will hurt in '18 and '19."

The company's future rested on a long-shot bid to build as many as four new container ships for Tote Maritime for the Hawaii trade. But the deal fell apart in January, and Philly Shipyard is now scrambling to find a new buyer for ships into which it has already invested $16.5 million in design work.

Philly Shipyard produces large oceangoing vessels for the Jones Act market, named for the 1920 merchant-marine protectionist measure that requires cargo shipped between U.S. ports to sail on American-made vessels, staffed with U.S. crews. The Jones Act market is narrow, largely restricted to vessels that trade between the U.S. mainland and Hawaii, Alaska, Puerto Rico, and Guam.

PSI, as the company is also known, told shareholders in a first-quarter report on Monday that it expects to post losses through 2019 "even if the shipyard takes an order for a new vessel construction project."

If it is unable to get a new order, "it would be challenging for Philly Shipyard to continue shipbuilding operations" after its last container ship is delivered early next year to Matson Inc., it said. The shipyard's shares, which are traded as PHLY on the Oslo Stock Exchange, are down about 50 percent since hitting a peak in August.

There seems to be no hint of despair among the workers busily climbing up scaffolds that surround the massive ship parts taking shape in the shipyard's cavernous assembly buildings, where the air is filled with the sound of clanging metal and sparks flying from welders.

One by one, the huge modules will be lifted into a nearby dry dock, where the skeleton of a recognizable container ship nearly three football fields long is materializing. The ship's hull is 68 feet tall, from keel to deck, and the pilothouse and ship's quarters will rise nine more stories above the main deck.

When it is completed, the new Matson vessel will have a lifting capacity, or deadweight, of 51,400 metric tons, and will hold 3,600 20-foot equivalent container units, or TEUs.

As impressive as that seems, the latest generation of supersized international container ships can be more than 20,000 TEUs. They are built at Korean and Chinese shipyards that can produce far more ships in assembly-line fashion at a lower cost than U.S. shipbuilders.

It costs four times more to build a Jones Act ship in the United States than to build a comparable vessel in Asia, said Peter Sand, chief shipping analyst for BIMCO, an international shipping association based in Denmark. "The society as such is paying a high price for protecting a market like this," he said.

Nevertheless, efforts to weaken the Jones Act typically get little traction in Congress, where advocates say it is critical for national security to maintain U.S. shipbuilding capacity.

Nerbovik portrayed the forthcoming "gap" in production as the result of a cyclical industry doldrum, similar to the 2010-11 downturn that forced the shipyard to shrink its workforce from 1,200 to 300. The shipyard rebounded from that recession when the shale-oil boom created new demand for petroleum carriers. PSI last year reported its highest profits ever, $67.2 million.

The company now has $106.5 million in cash, according to its quarterly report. But much of that is committed to repaying a secured $60 million low-interest loan due in 2020 that was arranged by the Philadelphia Industrial Development Corp. from the Welcome Fund, a loan program for economic development in the city.

Nerbovik said he does not anticipate having to seek out government assistance, although the state and the city have invested heavily in the facility since the former Navy shipyard was reborn in 1997 as a private venture headed by Kvaerner, Aker's predecessor.

Under the Norwegian company's lease with the quasi-public Philadelphia Shipyard Development Corp., various government agencies agreed to invest $438 million in 1997 to rebuild the former Navy facility, which last produced a new military vessel in the 1970s. The government also paid for employee training, as few skilled shipwrights remained in the labor force.

The government stepped in again in 2011, when PSDC agreed to buy $42 million in shipyard equipment with state funds and lease the equipment back to PSI. The city also deferred $8 million in taxes over three years as part of the bailout, and to rework a loan agreement.

The shipyard deployed the capital to help finance the revival of its tanker-construction business, which resulted in the construction of 12 petroleum carriers over seven years, valued at nearly $1.7 billion.

Nerbovik acknowledges the company's close partnership with government.

"We wouldn't be here without the city and the state's help," he said. "As of now, we think we can ride this wave without going back to the city, so we need to make sure we have the next order. That's the main focus."

Philly Shipyard is now exploring new markets beyond the commercial tankers and container ships that have been its mainstay. It is looking into building specialized vessels such as fishing trawlers and cable layers, as well as vessels to support the growing offshore wind industry.

It has also teamed up with Fincantieri Marine Group and Vard Marine to design and build the U.S. Coast Guard's next generation heavy polar icebreaker. Four other groups are competing for the work, and the government is expected to award the contract in the second quarter of 2019.

Nerbovik said the companies in its consortium are lobbying congressional delegations to try to win the Coast Guard contract. "We are discussing with them, making sure they know we have 500 jobs here and for the neighboring states," he said.

Philly Shipyard's current crisis was triggered after it fell short in a "battle royale" among shipbuilders fighting over an increasingly saturated market for new Jones Act vessels, particularly in the Hawaiian market.

The stage was set in 2016 when the leading shipper to Hawaii, Matson, the company buying the two containerships now under construction at the Philly Shipyard, ordered two new ships from a competitor, Nassco shipyard in San Diego.

Matson's decision was a blow to Philly Shipyard, Benjamin J. Nolan, a maritime analyst with Stifel Financial Corp., wrote in a report last year. It left Philly Shipyard with "no line of sight to more orders and it could require the closure of the facility."

Philly Shipyard then put its efforts into winning a contract with the second Hawaiian shipper,  Pasha Group, to produce two new replacement vessels. But Pasha picked a Texas shipbuilder, Keppel AmFELS, to build its two new container ships.

Spurned by the only two carriers that serve Hawaii,  Philly Shipyard then took "desperate measures," Nolan wrote, so it could get back into the market.

The shipyard announced in August that it signed a letter of intent to build new container ships for a third shipping company, Tote Marine, which now serves other Jones Act markets, and planned to use the new vessels to launch a Hawaii service. The shipyard started design work on the project, even though the final contract with Tote was not signed.

"We are not using the word 'desperate.'" Nerbovik said. "We are looking to new market potential for us."

But Tote was shut out of wharf space in Honolulu. And analysts said the Hawaii market could not support a third shipper with so many new vessels. In January, Tote allowed its letter of intent with Philly Shipyard to expire.

Philly Shipyard appears to have lost the battle. Having speculatively spent $16.5 million to develop designs for a ship whose potential buyer has sailed away, Nerbovik said he is eager to find another buyer, and soon.

"If we can reuse this container ship design for any other activity later this year, that would be fantastic," he said. "Then we can see a use of this investment."