Two years ago the National Bank of Washington was in the soup.

Today, the past is not yet fully buried. But in the last few months, management has been able to spend time planning the bank's future rather than correcting its earlier problems.

When Luther H. Hodges Jr. took over as chairman of the scandal-ridden bank in November 1980, profits were deteriorating. Its loan portfolio was chock-full of low-yielding mortgages. The investment portfolio was crammed with low-yielding municipal bonds.

With interest rates spiraling upward, the cost of obtaining deposits rose sharply. But with its earnings assets concentrated in fixed-rate mortgages and securities, income at Washington's third biggest bank did not rise apace.

Along with its earnings, NBW's reputation had plunged. A series of loan scandals rocked the bank. Federal regulators and newspaper articles outlined the bank's preferential treatment of borrowers who were close to some officials of the bank's principal owner, the United Mine Workers. Many of those loans ended up on the bank's problem loan list.

Capital, the stockholders' equity and retained earnings that are the bank's cushion against disaster, was inadequate.

Federal regulators forced the Mine Workers to give up any influence of day-to-day management of the bank. The union, which owns 76 percent of the bank's stock, can name only eight of the 25 directors. With the approval of the comptroller of the currency, Hodges was given a five-year contract as chairman. He became the bank's fourth chief executive in a decade.

Hodges, undersecretary of Commerce in the Carter administration, set out to revive the bank. He is responsible to the bank's directors, but, under the terms of the comptroller's agreement, his stewardship is virtually exempt from any legal accountability to the bank's owners.

Analysts and other bankers agree that the new management has strengthened the city's oldest bank. New UMW officials, who were elected last November, offer little criticism of Hodges' performance to date.

In the two years Hodges has been at the helm, he has worked off many problem loans, strengthened top management and, in order to boost its capital base, has cut the dividend to increase the amount of internal profits reinvested in the bank.

Nevertheless, Hodges, who was chairman of North Carolina National Bank before joining the Carter administration, has more rebuilding to do.

If the bank is to grow and diversify, Hodges said it needs to form a bank holding company and find a substantial injection of new capital. He said he wants to prepare the bank for deregulation and for the possibility that Congress will relax rules prohibiting banks from growing beyond the state in which they are headquartered.

But Hodges' plans for expansion hinge on the UMW.

The UMW bought control of the bank in 1949, when it was headed by the legendary John L. Lewis. It is the union's principal investment. And though the union now is prohibited from exercising any influence on the bank's day-to-day operations, when it comes to matters affecting shareholders--such as changing the corporation's structure or authorizing the sale of new stock--the big block of stock still rules. A top union official said the UMW leadership has not yet decided what it wants to do with NBW.

He said officials chafe under the comptroller's agreement and are unhappy owning something over which they have essentially no control. Without the ability to elect a majority of the directors they cannot select management or set dividends.

The official said relations between Hodges and the union's new leadership have been smooth. "So far, so good," he said. New President Richard Trumpka has said publicly that the UMW's leadership is made up of union officials, not bankers, and does not want to involve itself in the bank's daily operations.

Even the eight directors the new UMW leadership is expected to nominate this week will have only two UMW officials on it. The rest will be directors who are independent of both the union and the bank, sources said.

But the union, whose coffers are far from full, is unhappy with the bank's low dividend. The leadership also is unsure about Hodges' desire to sell new stock to expand the bank's capital base. Such a sale would dilute the union's ownership of the bank, although a firm majority of the stock would remain in UMW control.

Hodges has hired the securities firm Warburg Paribas to investigate selling $20 million of new stock in the bank, a move that would increase the bank's capital by one-third. Hodges said a big capital injection is needed if the bank's operations are to grow more than modestly, but he said the sale of new stock is not urgent.

"We're taking a hard look at each issue," said the official, who asked that he not be identified by name. The UMW's previous leadership apparently had agreed to selling new stock. The official of the new leadership said he thinks there is little pressure on the UMW to decide the issue immediately. NBW has been looking for potential investors for six months, with no hot prospects yet.

The union official, without committing the group to approving the stock sale, said he doubted there will be grave differences between management and the union over necessary steps to strengthen the bank. "There is a great deal of mutuality" between the bank's best interest and the union's, he said.

That mutuality, at first, involved strengthening the bank. Today, NBW appears to be a healthier institution than it was in 1980 and 1981.

In 1982, profits increased for the first time since 1979, even though the bank took a $1 million loss when it sold some of its low-yielding municipal securities. In the final three months of 1982, earnings were $1.5 million, 90 percent higher than the $787,000 earnings of the fourth quarter of 1981.

Bank sources said they anticipate earnings of about $2 million during the first three months of 1983.

The bank has been working off its problem loans. The number of loans being written off as uncollectible are declining. The bank also sold about $20 million of low-interest mortgages on its books.

In order to strengthen its capital base without selling new stock, the directors voted to cut the dividend from $2 a year to $1 and plow back the rest of the earnings into the capital of the bank. Hodges said that action ensures that the institution will have enough capital for its current size and satisfy regulators.

According to federal bank examiners, at midyear NBW had a capital ratio (capital divided by assets) of 5.86, while banks in its peer group--those with assets between $500 million and $1.5 billion--had a capital ratio of 6.55. In the last year, retained profits have added about $2 million to the bank's capital, while the level of assets stayed virtually constant.

Hodges has gotten some help from the general economy too.

Declining interest rates have made the yield on the bank's investment portfolio look much better. The market value of the old investment portfolio also has risen. When interest rates fall, the value of securities with fixed returns rises.

At the end of 1981, for example, the bank's investment securities could be sold on the open market for $135.1 million for about 78 percent of the $173.5 million the bank had paid for them (the book value). At the end of 1982, the market value of its investment securities was $113.8 million, about 84 percent of their book value.

Those low-yielding mortgages also don't look so bad today. No longer is the bank funding 9 percent mortgages with deposits that cost 14 percent. Instead, the yield on the mortgage portfolio is around 10 percent, said one official, while the cost of deposits is declining.

Hodges said the bank's image seems to have been repaired as well. When the bank made a public offering of $15 million in certificates of deposit last month, in denominations as small as $1,000, public response was good. The bank increased the offer to $25 million.

But the cost was high. NBW pledged to pay 11 1/8 percent for five years for the money. If interest rates continue to decline, the cost will be higher. Furthermore, the bank had to pay its underwriters--Johnston, Lemon & Co. and Wheat, First Securities Inc.--fees of almost $1 million to conduct the sale. Its proceeds from the $25 million will be close to $24 million.

Nevertheless, the certificate of deposit offering, the first time such a move was tried in the area, gives NBW $24 million in deposits that are secure for five years. It is a base off which the bank can fund longer term, fixed-rate loans, without risking a sudden run-up in rates like the one that caused it diffculties in 1980 and 1981.

At least one Washington banker, who agrees that NBW has made strides in the past two years, disputes the notion that ready public acceptance of the certificate offering indicates that NBW's image problems are over. "It's got nothing to do with good or bad image," he said. "It's got all to do with the high rate they were willing to pay for five years."

Hodges said he had no illusions that turning the bank around would be easy. Even with the increase in earnings last year, the bank's $4 million in operating profits (before the $1 million loss on securities sales) is substantially below the $6.9 million it earned in 1979, when the bank's assets were nearly $200 million less.

Barring an economic disaster, however, he said the earning power of the bank has been substantially restored. Hodges said his chief concern now is not mopping up old problems, but putting the bank in the proper direction for the future.

The bank has applied to become a bank holding company known as the Washington Bancorporation. At the outset of Washington Bancorp's existence, its only asset would be the National Bank of Washington. Stockholders would receive stock in the holding company in direct proportion to their ownership in the bank. The union would own 76 percent of Washington Bancorp.

Banks are much more restricted than bank holding companies. Holding companies can buy other businesses that the Federal Reserve Board rules are "closely related to banking." That can mean anything from a savings and loan association to acquiring a discount broker (as the Federal Reserve just permitted BankAmerica Corp. to do).

But before a new holding company could diversify its interests--"to be a major factor in the new financial services industry," as Hodges put it--the bank will need more capital. At present, the bank is returning enough of its profits to its equity base so that modest asset growth can be supported without upsetting regulators.

Earnings, however, are insufficient by themselves to support either new ventures within a holding company or even a major expansion of the bank itself--whose $1.1 billion in assets puts it a distant third in the city behind Riggs's $3.7 billion and American Security's $3.4 billion.

Even if the union approves the sale of the additional $20 million in stock that Hodges believes the bank needs to position itself for the future, finding investors will not be easy.

There are not an inordinately large number of investors willing to put money in a bank whose earnings still are far from attractive. At NBW, any purchaser would become nothing more than a big minority shareholder in an institution firmly controlled by the United Mine Workers.

The task of moving the National Bank of Washington into the diversified field of financial services in the 1980s may prove to be a more formidable task than cleaning up the National Bank of Washington of the 1970s.