The Iran-Iraq war, the Exxon Valdez oil spill and an international credit squeeze are unlikely ingredients for a successful business recipe, but they have transformed Lisnave from a management nightmare into the world's busiest ship repair yard.

The yard's sprawling dry docks, separated from historic downtown Lisbon by the Tagus River, sat empty five years ago. But for the past two years Lisnave rode an international shipping boom to top the world repair charts in tonnage terms.Chairman Jose Manoel de Mello, once beleaguered by a militant work force fighting job cuts and stiff competition from a state-owned rival during a chronic worldwide sea transport recession, says he is bristling with ''confidence and optimism" for the next decade.

"We're very optimistic about the next three to five years because of hints from the market," Mr. de Mello said in a recent interview. "New ships are extremely expensive, and recent accidents that have caused massive pollution will result in agreements on higher maintenance standards."

The end of the Iran-Iraq war boosted oil shipments, 93 percent of which go by sea. But the long shipping depression following the 1973 oil crisis wiped out many shipyards and left a legacy of aging, poorly kept fleets.

By 1985, profits from international shipping had become so lackluster that only about 26 banks from a grand total of 250 lenders were left to bail the sector out.

Even today, though shippers enjoy better credit ratings than many Third World nations, available loans still can't meet their needs.

Major lenders such as Citicorp and Chase Manhattan Bank estimate it will cost $200 billion to replace old ships and allow a moderate upswing in traffic before the year 2000.

New vessel costs at the scaled-down shipyards that survived the crunch are sky-high, and waiting lists are long.

Secondhand ship prices have spiraled, and owners are prepared to spend more on life-extension projects that will keep their craft afloat longer.

All good news for Lisnave, which this week signed a long-term agreement with Chevron Oil Corp. to service its tankers in the Atlantic.

The agreement, which covers regular check-ups of Chevron's high-tech fleet via computerized information exchanges between yard and tanker, is more akin to aircraft or offshore oil-rig maintenance than the traditional dock-it, test-it, fix-it ship yard approach.

Chevron officials agree that last year's Exxon Valdez disaster off the Alaskan coast will lead to more rigorous standards for the shipping industry.

"The Exxon Valdez focused public opinion on environmental concerns that would have come anyway, but more slowly," said Douglas Wolcott, Chevron Shipping president.

"The pressures of this decade are going to mean higher quality is needed" in ship design, maintenance and crew training, he added.

Many shippers, particularly smaller ones that struggled to survive during the crisis years, often couldn't afford to maintain high standards when faced with a lack of funds, he said.

According to Mr. Wolcott, new and stiffer U.S. oil spill liability laws and tanker maintenance and design standards expected to be approved by Congress are likely to be adopted by other countries and possibly the United Nations' International Maritime Organization.

With more new business expected, Lisnave can breathe easier, something it wasn't used to even a year ago.

Last year's sales totaled $135 million, up from $61 million in 1986. Analysts say Lisnave could post a $6.6 million profit this year.

Though the yard wasn't closed after Portugal's 1974 leftist Revolution of the Carnations, the cost was high. Lisnave owed as much as $310 million to banks and the state, including $238 million in crippling short-term loans.

But now the government has agreed to swap some debt for equity and consolidate the rest over 17 years at a very favorable 2.5 percent rate.

Equity was also increased. The work force has been cut through early retirement and layoffs from 11,000 to 3,800, though the figure remains 800 higher than management's goal.

Lisnave has secured a stake in nearby Setubal's Setenave, a formerly state-owned rival that hurt the Lisbon yard with cutthroat pricing during the slump.

Mr. de Mello says he's also confident of a secure market over the longer term.

Some 81 percent of the world's raw materials still are carried by sea, and Lisnave is ideally positioned for Atlantic business, he says.