The failure Monday of a small energy-oriented bank in Oklahoma City has triggered huge loan losses at some of the nation's biggest banks.

Continental Illinois National Bank, the nation's biggest business lender, said it will report a loss in the second quarter as a result of bad loans it bought from Penn Square National Bank, the Oklahoma City bank that was closed by federal banking officials on Monday evening.

So will Seattle First National Bank. Northern Trust of Chicago will report a decline in earnings, and Chase Manhattan Bank, already reeling from $285 million in pretax losses incurred when its customer, Drysdale Government Securities Inc., failed in late May, will see its second-quarter losses swell because of Penn Square loans it owns.

Penn Square, only five years ago a tiny consumer bank, grew swiftly in recent years by making loans to small oil and gas companies, then selling all or part of the loans to other banks such as Continental and Chase. All told, Penn Square sold about $2 billion of these loans, half of them to Continental, the sixth biggest bank in the country in terms of assets.

Many of the oil and gas companies are in dire financial condition because of declining oil prices, and are unable to make payments on their loans.

Although Penn Square sold most of the loans it made, it still had enough uncollectable loans left in its $485 million portfolio that the comptroller of the currency closed the bank Monday night. Banking analysts estimate that the bank had at least $50 million in loans that never would be repaid, a big enough write-off to eliminate both the bank's reserves and its capital.

The bank's deposits and assets were turned over to the Federal Deposit Insurance Corp. While depositors will be repaid in full up to $100,000, those who had more than $100,000 in an account with Penn Square will become general creditors of Penn Square for the excess.

The FDIC set up a new bank, Deposit Insurance National Bank, to assume the insured deposits of Penn Square. The new bank, which is being run by the FDIC, opened its doors in Penn Square's offices yesterday morning. Despite assurances from FDIC Chairman William Isaac that all deposits up to $100,000 were safe, customers jammed the lobby. At noon, despite 90-degree heat, more than a hundred persons spilled into the street and cars lined up outside the bank's drive-in windows.

Penn Square was the 21st bank to fail this year in the United States. There are about 14,000 banks in the country.

Federal officials, still trying to piece their way through billions of dollars of loan transactions, said that, surprisingly, most of the $2 billion in loans were made this year, long after oil prices had begun to decline and the risks of such investments should have been evident.

An official of the FDIC, which guarantees deposits up to $100,000, said the goverment agency had to take over the bank rather than sell it--the customary procedure--because of a "substantial possibility" that banks such as Continental and Chase had legitimate claims against Penn Square because of the loans the Oklahoma bank packaged and sold.

A banking analyst said that he estimated the banks that bought Penn Square loans will have to take loan loss write-offs of about $250 million or more for the second quarter.

A spokeswoman for the Comptroller of the Currency's Office, which regulates national banks such as Penn Square and Chase and Continental, said that, although the loan losses were big, they can be "handled by the banking system."

At a news conference in Oklahoma City, Isaac said he estimated that about $190 million of the bank's $460 million in deposits were not insured. Depositors with uninsured funds will be issued a "receiver's certificate" in the amount of the uninsured funds. An FDIC spokesman said the agency estimated today that uninsured depositors will get back about 80 cents on the dollar, but said the actual amount could be higher or lower, depending upon how much the FDIC receives when it sells the bank's assets.

The FDIC also is a general creditor because the agency has put up the funds to pay off the bank's roughly $250 million of insured deposits.

About 80 percent of Penn Square's loans were to energy companies, including a big investment in the financially troubled oil companies of one of the bank's directors, Carl W. Swan. Swan reportedly is a close friend of Penn Square Chairman Bill P. Jennings.

The Comptroller of the Currency's Office first detected problems in Penn Square's portfolio last April, a spokeswoman said. Last week, the comptroller told banks who had bought portions of loans made by Penn Square that a number of the loans had been identified as "problems."

Continental Illinois, Chicago's biggest bank, was hit the hardest. All told, Continental bought all or portions of several hundred loans from Penn Square. CAPTION: Picture, Customers line up outside the failed Penn Square National Bank in Oklahoma City yesterday despite FDIC assurance that deposits up to $100,000 were safe. UPI