A Maryland circuit court judge extended indefinitely yesterday the state's control of Merritt Commercial Savings and Loan Association of Baltimore, one of two thrifts at the center of the state's savings and loan crisis.

Judge Joseph H.H. Kaplan in Baltimore also extended his June 12 ban on withdrawals and restrictions on interest payments for Merritt accounts from 15 days to 90.

Kaplan and an attorney for Merritt said that yesterday's actions were aimed at strengthening Merritt's troubled financial condition by blocking substantial cash withdrawals and by bolstering Merritt's ability to meet its loan commitments.

Kaplan's ban on withdrawals at Merritt does not apply to deposits made after May 14. It limits interest on passbook accounts and certificates of deposit that have matured to 5.5 percent.

Kaplan issued the orders at the request of state officials and after consulting with Merritt officials, who agreed to the decision.

A state official said there was a danger that Merritt would have become "cash poor" after one month if the halt on withdrawals was not extended.

Kaplan said that projections showed that up to $22 million in deposits might have been withdrawn from Merritt in a month if the ban on deposits had not been extended beyond its original June 27 expiration date.

"They Merritt do not have the cash to allow $22 million to flow out," Kaplan said in a telephone interview. Merritt and another troubled thrift, Old Court Savings and Loan Inc., in Baltimore, were placed under state conservatorship last month after reports of management changes and allegations of possible criminal wrongdoing at Old Court prompted heavy runs on deposits and brought a crisis of confidence in the state's thrift industry.

The crisis forced the state to abolish the private Maryland Savings-Share Insurance Corp. (MSSIC) in favor of a new, largely temporary state insurance fund and encouraged the 102 thrifts formerly insured by MSSIC to seek federal insurance.

Kaplan said that a review of Merritt's operations has shown that Merritt's loan portfolio needs to be reorganized and that a substantial number of Merritt's projects will need to be sold to generate sufficient capital to cover its depositors' accounts.

The judge's orders yesterday also give the state conservator the power to sell real estate projects that Merritt is financing. Kaplan said Merritt's owner, Gerald S. Klein, has the right to be consulted before any such sale but he does not have veto power.

Francis X. Pugh, an assistant attorney general, said yesterday that the ultimate fate of Merritt has not yet been decided and that the options include breaking it up or merging it with another institution. He said there is still a possibility that Merritt could survive and receive federal insurance, but that is "the least likely of the three options."

In another action yesterday, Second National Building and Loan in Annapolis announced that it had won final approval for federal insurance and that all restrictions have been lifted. Second National is the sixth state institution previously insured by MSSIC to receive federal insurance.