The state of Maryland last night took over Community Savings & Loan Association of Bethesda and Equity Programs Investment Corp., its faltering real estate investment arm.

Montgomery County Circuit Judge Irma S. Raker issued a court order naming the Maryland Deposit Insurance Fund (MDIF) as conservator for Community and all its subsidiaries, including EPIC and EPIC Mortgage Co.

The order freezes all withdrawals from Community for 45 days and places Community under the same kind of direct state control as Old Court Savings & Loan and Merritt Savings & Loan.

Judge Raker's order signed at 11:10 p.m. gives the state insurance fund authority not only to manage Community and its subsidiaries, but also the power to vote their stock, which would allow state authorities to sell Community, EPIC or any of their dozens of related companies.

Maryland moved to take over Community only hours after negotiations in New York to arrange a bailout for EPIC reportedly failed to produce results. But even before the state acted, the EPIC financial crisis had begun triggering secondary shocks that could affect the entire mortgage industry and homebuyers across the nation.

Faced with a potential loss of $165 million from EPIC, Ticor Mortgage Insurance Corp., the nation's fourth-largest mortgage insurer, announced that it will stop accepting new policy applications after next Tuesday and disclosed it has replaced its chairman.

The Maryland Board of Savings and Loan Commissioners voted yesterday afternoon to take the action against Community in a resolution that said the state had determined Community "will not qualify for federal insurance."

Frederick Dewberry, departing director of MDIF, said he had been involved in several meetings attempting to arrange a bailout of EPIC and had become convinced no rescue would succeed. "I have not been advised of any tentative or final binding agreement for the purchase by any white knight," he said. "I have concluded Community is unable to divest itself of the EPIC companies."

In documents filed in court last night, Maryland officials disclosed that the Federal Home Loan Bank Board had set eight conditions for Community to qualify for federal insurance, and that the institution did not appear to be able to meet any of them.

Among the demands was that Community eliminate all indirect control by Thomas Billman and any transactions with Crysopt or any other companies owned by Billman. Billman is the founder of EPIC, and Crysopt is a holding company for many of the EPIC companies.

Yesterday's developments made clear there is little hope for a quick resolution of the problems that made Community the fourth Maryland savings and loan to close its doors since the crisis began this year.

The conditions for federal insurance included a demand that Community eliminate nearly $50 million in EPIC investments it was holding and obtain at least $108 million in new capital to meet minimum standards of financial health.

On Aug. 19, Maryland Gov. Harry Hughes ordered a 20-day halt on all withdrawals from Community. Before the withdrawal window was closed, Community had lost $138 million in deposits since Jan. 1, out of total assets of $540 million this year, Dewberry disclosed.

At a brief court hearing last night in Rockville, James B. Deerin, EPIC's vice president and general counsel, said EPIC consented to Judge Raker's order to protect depositors and shareholders and to stem "further dissipation of assets."

Community did not object to the state convervatorship, which accomplishes virtually the same result sought in a separate legal action in federal court in Alexandria earlier in the week. Two banks that are trustees for about $950 million worth of mortgages on EPIC property had unsuccessfully asked for appointment of a federal receiver to take over EPIC's affairs.

"EPIC didn't collapse today; it wasn't rescued," said Melville S. Brown, who becomes director of MDIF at noon today. Brown explained that the problems that have surfaced in the last two weeks are long-standing difficulties, and the actions taken yesterday are not the end of the situation.

State officials argued that a 90-day conservatorship was necessary because talks with federal officials, and others involved with EPIC's finances indicated it will take at least that long to work out a solution. Community's lawyers urged that the conservatorship be limited to 45 days.

Judge Raker's court order limits the interest Community can pay on deposits to 5.5 percent.

The state of Maryland moved against EPIC as Gov. Harry Hughes was preparing to leave for Europe for two weeks.

A source closely involved in the EPIC situation said he believed the court action was taken because "the state of Maryland felt this is their only option."

He said the action "allows an accounting to the public by a dispassionate mediator. . . . It allows the orderly disposition of the properties without a fire sale and without the creditors trying to force EPIC into bankruptcy."

Earlier yesterday, EPIC Residential Network Inc. (ERNI), a real estate sales subsidiary, called in all its employes, gave them their last paycheck and told them the company would be out of business by the end of next week.

"We're basically gone," said Robert L. Sirianni, head of ERNI's Pittsburgh regional office. "We're shutting down."

The EPIC crisis is sending waves through the nation's mortgage-finance system, which now depends in a major way on Wall Street investors for capital. If EPIC collapses and Ticor follows, investors' confidence in mortgage insurance may be shaken, and the result could be higher mortgage interest rates for home buyers.

"If Ticor goes down, it's going to create a lot of concern -- 'who's next?' I think people who buy mortgages and mortgage-backed securities will be more hesitant and demand higher yields," said Stephen Pasko, managing director in charge of mortgage finance at Drexel Burnham Lambert.

Private mortgage insurance has made home ownership possible for millions of home buyers who cannot afford to make a big down payment on the house of their dreams.

Roughly three out of every 10 mortgages written in the last year carried private insurance and among first-time buyers -- who usually have less cash for down payments -- the number of mortgages with private insurance was far higher.

The EPIC-Ticor situation "is very, very disheartening; frightening in some respects," said Mark K. Posnick, president of Criterion Financial Corp., a mortgage-banking concern based in Dallas. "Something is wrong with the system, and it's going to be paid for."

While the mortgage industry was worrying about the future, EPIC's ERNI division became history.

ERNI's closing appears to raise further problems for EPIC, which has been unable to make payments on mortgages and mortgage-backed securities totaling about $1.4 billion. EPIC is negotiating with Ticor and other mortgage insurance companies that hold the policies on these loans and with several Wall Street investment banking houses in an effort to work out a rescue plan.

In addition, representatives of Moody's Investors Service met here yesterday to brief regulators, industry officials and congressional staff members on the condition of the mortgage insurance industry.

The mortgage insurance industry faces potential losses of $300 million to $400 million from EPIC's problems. Ticor's exposure totals $166 million, a figure so large that it has raised doubts in the industry about the company's ability to survive.

Equity Programs Investment Corp., which is owned by Community, set up real estate investment partnerships to buy single-family homes, rent them out for a few years and then sell them. Investors received extensive tax benefits -- $2 in deductions for every $1 they put up -- and hoped-for profits from the properties' sale.

The purchases were financed by mortgages written by EPIC Mortgage Inc. EPIC Mortgage put these loans into pools and then sold securities based on them, or it sold the loans themselves. In either case, the loans were covered by mortgage insurance to make them attractive to investors.

EPIC, which was founded in the mid-1970s, grew explosively in the early '80s, and today its partnerships own about 20,000 houses.

ERNI -- the operation set up to sell the houses for the partnerships -- is headed by Joel H. Bernstein. Neither he nor other EPIC officials could be reached for comment yesterday.

According to former EPIC employes the rental income on the houses was often not adequate to cover debt service and other costs on the houses, and last month EPIC announced that it was delinquent on some of the loans.

On Wednesday, the National Bank of Washington and First National Bank of Maryland, trustees for mortgage pools totaling about $1 billion, obtained a court order requiring EPIC to put rental income into escrow.

Each passing day puts more pressure on EPIC and Dean Witter Reynolds, the brokerage subsidiary of Sears, Roebuck & Co., which is leading efforts to come up with a rescue plan.

There have been reports that an unidentified real estate company is interested in taking over EPIC, but apparently no deal has yet been struck. Robert Lee, the Dean Witter executive heading the bailout effort, has refused to return phone calls for several days.

Ticor yesterday obtained permission from regulators in California, its home state, to separate its troubled mortgage insurance business from its lucrative title insurance company.

Ticor said the split means "Ticor Title Insurance Co. is not in any way subject to the potential consequences of an EPIC default."

In a statement issued yesterday in the name of its new chairman, William J. Fitzpatrick, Ticor said it would honor all commitments that are outstanding but will accept no new applications for policies after Sept. 10. "It appears that it may be quite some time before the consequences of the reported EPIC default can be quantified and its impact on Ticor Mortgage can be ascertained."

Thus it would be prudent not to increase the company's outstanding risk, the statement said.

Fitzpatrick replaced Raymond R. Rodeno, who resigned as chairman.

One industry source said, however, that it appeared that the EPIC default would require Ticor to set so much aside for a loss reserve that it would lack adequate capital to write new policies.

EPIC is under pressure from both mortgage insurers and mortgage owners to sell to raise cash. In addition, most of the firm's investment partnerships "mature" after about four years and the properties were to be sold.