The U.S. steel industry has been down so long that it looks like up from here.

And it is up, compared with the $12 billion in losses that the industry suffered in the past five years. For the first two quarters of this year, most of the nation's huge integrated steel mills had modest bottom line or operating profits. Fatter returns are expected for the third quarter.

More good news for the industry: Steel prices are the highest in three years, imports have declined slightly, and capacity over the past decade has tightened to an estimated 112 million tons this year from a peak of 160 million tons. American companies now beat the Japanese in the number of man hours is takes to ship a ton of steel.

As in other American manufacturing industries, the positive effects of a falling dollar are being felt as customers find U.S. products becoming more competitive in price and quality. The result is that steel producers have reclaimed part of the domestic market as imports have become less attractive and the effects of a government-imposed program to control shipments of foreign steel are felt.

"There is no doubt that things are better in steel than almost anyone had predicted," said Kathleen Utgoff, executive director of the Pension Benefit Guaranty Corp., which has assumed some $3.4 billion worth of unfunded pension liabilities from struggling steel companies in the last 10 years.

"The dollar changed everything," said Aldo Mazzaferro, a steel analyst with Cyrus J. Lawrence.

The contrast is striking.

Not long ago the outlook was so bad that Jean Scott, a laid-off steelworker at Bethlehem Steel Corp.'s Sparrows Point facility in Baltimore, threw away her steel-toed work shoes because she thought she would never be called back to help tend the plant's "H" blast furnace, which produces molten iron.

"Around here, you just don't get your hopes up too high," said Scott, who was put back on the payroll along with about 200 other workers when Bethlehem not only started up an extra blast furnace at Sparrows Point but also put into operation one of four furnaces in its old open hearth shop to supplement its more modern basic oxygen furnaces.

Yet another open hearth furnace is scheduled to go into operation this month.

"They have been put on simply to respond to the need for semifinished steel," said S. Robert Kinghorn, the plant's controller. The moribund export market also has picked up for Sparrows, however modestly. "Last year, we shipped 30,000 tons of hot bands to Japan. That's like taking coffee back to Brazil," said Kinghorn.

Start-up costs for the blast and open hearth furnaces will come to several million dollars, but shipments will be boosted to three million tons -- the plant's healthiest output in six years.

Operating profits -- the first time Sparrows Point has seen them in seven years -- have not come without pain. Employment has been cut from 19,400 in 1979 to 8,200, and a million tons of capacity has been pared. Workers have offered concessions to trim costs. Bethlehem says it has poured a billion dollars into new equipment such as a continuous caster, which transforms molten steel into semifinished steel in fewer steps with fewer workers than more traditional methods.

"It's going to be a tough industry and some will not survive," predicted Kinghorn.

There have been plenty of casualties to date: Since 1980, according to the American Iron and Steel Institute, 450 steel facilities have been shut down -- either entire plants, selected facilities or whole companies. Some have taken the bankruptcy route.

Bethlehem itself was a company in critical condition last year after five years of losses, and was considered a likely candidate to follow two competitors, Wheeling-Pittsburgh and LTV Corp., into bankruptcy.

Since then its stock price has revived, its cash reserves have grown (reaching $627.5 million by the end of June), and it earned $72.4 million in the first half, compared with a loss of $115.6 million for the same period of 1986.

Also, its order book for more depressed facilities such as its plant in Johnstown, Pa., has been fattened. Norfolk Southern Corp. ordered 500 covered-hopper rail cars from the Johnstown freight car division to haul cement, an order that analyst Mazzaferro believes to be worth $22 million.

Still, the long-term outlook for the industry remains cloudy.

Though Bethlehem's return to profitability is being repeated throughout much of the industry, some of the more dismal fundamentals have not changed.

Also, some of the current profits have been boosted by companies taking investment tax credit refunds under a special provision for the industry in the new tax law.

For these reasons, many steel executives and analysts are hedging their bets on a long-term lasting recovery.

"I'm reluctant to say the steel industry has been returned to health as a long-run matter," said Thomas C. Graham, president of USS, the steel division of USX Corp.

Graham theorized that some of the "unusual demand" in the industry is a drive on the part of customers to rebuild inventories that were depleted, in part, during the six-month strike at USS last year.

"The expectations are a lot greater than the reality," said Charles Bradford, a vice president with Merrill Lynch Capital Markets. "The bad news is it might not last. Their balance sheets haven't been improved enough to weather a storm."

And the storms are many. There is the dread specter of a recession -- which, almost everyone agrees, would undo the progress the industry has made.

There are major problems such as world and domestic overcapacity. Wharton Econometrics estimates that the tab for restructuring and modernization could run up to $35 billion over the next five years. Foreign competitors continue to be a threat despite the success of the Voluntary Restraint Agreement program the Reagan administration has negotiated with 29 countries to control imports.

Competition from highly efficient steel mini mills and increases of so-called "indirect" steel imports, such as automobiles, also have hurt the industry.

Though many steel analysts credit the industry for the progress it has made, Walter Adams, an economics professor at Michigan State University, said the industry's problems are of its own making. "To this day they don't have an analytical understanding of what their problem is," said Adams. "It's like an alcoholic blaming his problem on everyone but himself."

The nub of the problem, many believe, is capacity -- and cutting it could be the cure for many of the industry's ailments. But that approach presents a classic Catch-22.

Because of the pension and retirement benefits that are triggered when capacity is cut, the industry can ill afford an estimated $70,000 per worker in shutdown costs, forcing it to maintain excess capacity and further erode profitability.

From 1983 to 1985 alone, the major steel companies took $2.4 billion in charges against their balance sheets for plant closings, according to AISI.

Years of underfunding, overly generous labor contracts and a dwindling ratio of active workers to retirees have created a pension liability time bomb that, if the plans of the six major steelmakers were terminated, would amount to $5.7 billion, according to a study of the industry's retirement costs done by PaineWebber.

Already, the Pension Benefit Guaranty Corp. is groaning under the weight of the $2.3 billion in pension liabilities it assumed from LTV after the company filed for bankruptcy last year. Since then, it has become clear that companies gain a competitive advantage when they shift costly pension obligations to the agency, which insures the pension benefits of some 40 million workers.

That fact has not escaped players in the industry who have not received the benefits of bankruptcy, or the federal government, which worries that the PBGC -- whose obligations already exceed its ability to pay benefits by $4 billion -- would break under the weight of more steel-related bankruptcies.

"The bankruptcy laws were not designed to restructure a whole industry, but that's what's happening," said Frank Luerssen, chairman of Inland Steel Industries, which has a healthy pension plan. "It gives the weak guys a competitive advantage and there is something fundamentally wrong with that."

Added the PBGC's Utgoff: "We don't want to encourage companies to compete on the basis of how little they put in their pension plans."

To try to cure that problem, a flurry of legislative legwork has been done in the Congress to try to help steel companies stay out of bankruptcy.

Sen. John Heinz (R-Pa.) plans to introduce a bill this week that would establish an authority to pay early retirement benefits for workers involved in steel shutdowns between 1982 and 1990. The authority would be backed by assets, equity or debt from the companies, which would be responsible for paying normal retirement benefits.

"I don't think the steel industry will reduce capacity outside of bankruptcy without a government plan to help them," said Heinz.

Another plan offered by Rep. Richard Schulze (R-Pa.) proposes a federal line of credit for steel companies in exchange for every ton of steelmaking capacity permanently shut down. Rep. Benjamin L. Cardin (D-Md.) would auction off the right to import foreign steel and funnel the revenue to the industry on a conditional basis.

Also waiting in the wings is pension reform legislation that is expected to become part of the House budget reconciliation bill. Those proposals call for tougher minimum funding requirements regarding company contributions to underfunded pension plans with a "transition rule" that eases the impact on big steel. It also would make it more difficult for steel companies in Chapter 11 to turn over unfunded pension liabilities to the PBGC.

Originally, the industry hoped that help would come from a Cabinet-level committee within the Reagan administration that was propelled into action after the LTV bankruptcy.

But the combination of divisions within the industry over how any rescue plan should work, philosophical differences within the Reagan administration over engineering what could amount to a bailout, and the reappearance of profits within the industry have stymied any action.

"It's too premature to say whether it's dead in the water, but we are still talking among ourselves," said Dennis Whitfield, deputy secretary of Labor. "The question is do you do something, or leave the status quo?"

The industry may have to wait for the next presidential election to find out the answer to that question as big steel companies and steel workers use their leverage on candidates and the White House.

"To the extent that the market is rationalizing and margins stay up, the odds are shifted toward letting nature take its course," said a government source.