A Baltimore Circuit Court judge, in a move aimed at pumping much-needed cash into Merritt Commercial Savings and Loan, today ordered the sale of a 29-story office building being constructed by the thrift in the heart of this city's financial district.

Judge Joseph H.H. Kaplan also extended his earlier ban on withdrawals at Merritt until Oct. 30 and extended indefinitely the state's control of the company, which is one of several at the center of Maryland's continuing savings and loan crisis.

Merritt, which is targeted for purchase by Chase Manhattan Corp., the giant New York bank holding company, stands to reap a "large infusion of cash" through the sale of the Merritt Tower in downtown Baltimore, Kaplan said in an interview.

The judge set the minimum purchase price for the tower building, which is currently valued at $43 million, at $30 million. Kaplan ordered the Maryland Deposit Insurance Fund, Merritt's conservator, to accept sealed bids for the skyscraper by Oct. 31.

Kaplan said he expects Chase, the nation's third largest bank holding company with $86.3 billion in assets, to make a formal offer to acquire Merritt "within two weeks." Earlier this year, the thrift reported having $340 million in assets.

Chase's acquisition of Merritt would round out a three-part deal through which Chase hopes to become a formidable financial presence in Maryland well before the scheduled arrival of interstate banking.

On Tuesday, Chase announced its takeover of Friendship Savings and Loan Association of Bethesda, and, earlier this month, its acquisition of Chesapeake Savings and Loan Association of Annapolis. Both acquisitions are contingent on passage by the Maryland General Assembly of a new banking law that would permit Chase to convert the thrifts to commercial bank branches and on federal and state regulatory approval.

Although state government and thrift industry sources said earlier this month that Chase had offered to purchase the Merritt Tower as part of its acquisition of the thrift itself, Kaplan said today that "Chase does not want the tower."

The sale of the Merritt skyscraper has been hampered, the judge added, because "the buying public out there doesn't know it's for sale. They think it's part of the Chase package and that just isn't so."

State legislators may be called back into special session in late September or early October to decide whether to permit Chase's acquisition of Merritt, Chesapeake and Friendship, purchases viewed by many officials as a way to free Merritt deposits and reduce the government's financial exposure during a protracted savings and loan crisis.

Kaplan said yesterday that sale of the Merritt tower "means . . . that there will be a very large amount of cash available even if the Chase deal doesn't go down."

But, he added, Merritt "depositors, as a matter of law, are third in line" for that cash behind the thrift's lawyers and creditors.

In other developments today, the Federal Home Loan Bank Board granted conditional federal insurance to Sharon Savings and Loan of Baltimore and its subsidiary, Security Savings and Loan, contingent on the two thrifts merging into one association, which state officials said will be called Sharon Savings and Loan.