The Federal Home Loan Mortgage Corp. yesterday halted all funding of mortgages in the District of Columbia, a move that may make it virtually impossible to find bank financing for home purchases in the city.

The cutoff duplicated an earlier action by the Federal National Mortgage Association, the nation's largest single supplier of mortgage money, and created new problems for a housing industry already beset here by a scarcity of mortgage money and interest rates at record highs of more than 14 percent.

Both lending institutions said they decided to suspend financing here because of questions about the legality of City Council emergency legislation under which the District interest rate celling was raised temporarily to 15 percent.

During the first nine months of this year, the Federal Home Loan Mortgage Corp., a government agency, bought about $66 million worth of mortgages originated by the city's 16 savings and loan associations, while the Federal National Mortgage Association, a private firm, purchased 370 conventional home mortgages valued at $18.4 million, mostly from mortgage banking companies. Together, the two financial institutions provide the single largest source of home mortgage money here.

Even before the Federal Home Loan Mortgage Corp. action, some of the largest home mortgage lenders in the city had announced yesterday that they had stopped making loans in the city or curtailed them.They cited the refusal of the Federal National Mortgage Association (Frannie Mae) to buy those loans until there has been a resolution of the legal dispute over the City Council's emergency legislative suthority.

"We have discontinued as of this morning," said Thomas J. Owen, president of Perpetual Federal Savings and Loan Association, the city's largest savings institution. "We have to take Fannie Mae's decision seriously."

Weaver Brothers, a mortgage lender, said it also no longer would make conventional loans in the city. the District's fourth largest savings and loan, American Federal, said its chief funding sources were cut off when three of its largest institutional financial supporters called say they no longer would buy American's loans until the legal issue is settled. Moreover, American President William Sinclair said the Federal Home Loan Mortgage Corp's fund cutoff would all but eliminate the S&L from the mortgage market.

Sinclair said that American Federal currently has $12 million to $15 million in loan applications from builders for housing projects that it had hoped to resell to the Federal Home Loan Mortgage Corp.

Virginia and Maryland are not affected by the D.C. legislative and legal dispute because those states have no legal interest rate cellings.

The D.C. City Council, acting without debate, tried to resolve the home mortgage problem in the city by enacting permanent legislation yesterday, setting the interest rate ceiling at 15 percent for residential loans and a variety of consumer loans. Mayor Marian Barry signed the legislation within an hour after it was passed.

The new permanent rate, however, cannot go into effect until Congress has a chance to review the measure. Congress retained this overseeing power under the city's Home Rule Charter. The congressional review takes 30 legislative days -- days in which either house of Congress is in session.

Given days off, recesses, adjournment time and procedural lags, city officials estimated yesterday that at the earliest the legislation could take effect in early January and, at the latest, in March.

The permanent measure will replace the emergency mortgage interest rate legislation that prompted the funding cutoffs. Under the city's limited home rule powers, the City Council can invoke emergency authority to pass legislation that remains in effet 90 days.

It was the use of that power by the council to enact the same legislation more than once that led D.C. Superior Court Judge George H. Revercomb to rule on Oct. 19 that the city's moratorium on condominium conversions was illegal.

Although the city is appealing that decision to the D.C. Court of Appeals, Fannie Mae, the Federal Home Loan Mortgage Corp. (Freddie Mac) and the institutional financial supporters of American Federal Savings & Loan have concluded that the emergency interest rate ceiling may be illegal, too.

The existing permanent interest rate ceiling is 11 percent in the city, which was raised by the council twice under emergency legislation, eventually to 15 percent.

At least one mortgage settlement was abruptly canceled yesterday 15 minutes before the scheduled closing, when the mortgage banking firm involved told the purchaser that, since the loan could not be sold to Fannie Mae, the deal was off.

Involved was a $165,000 purchase of a home on Capitol Hill, according to a lawyer for the transactions, Benny L. Kass. He called Fannie Mae's decision "outrageous . . . I think they overreacted. They did not really read the opinion in the previous (Superior Court) case. . . No one has held that interest rates are usurious."

Kass said he is representing several tenant groups now in "desperate shap" as they seek money to buy their properties. "I think we can demonstrate a real emergency" of nature that would uphold the current 15 percent ceiling even if other council action is found to be illegal, Kass said.

Del. Walter E. Fauntroy (D-D.C.) plans to try to persuade Congress today to waive its 30-day review, a move that would let the new interest rate ceiling go into effect immediately.

Rep. Michael Barnes (D-Md.) said he also is planning to introduce similar legislation.

In normal times, both savings and loans and mortgage banking firms make loan agreements with individual borrowers. The S&Ls and mortgage bankers often sell these loans to Fannie Mae and Freddie Mac or other government or private investors. The money the S&Ls and mortgage banking firms get in return is then used to make more loans.

In an impromptu press conference in a District Building hallway, Mayor Barry said he first learned of the found cutoff in yesterday's Washington Post.

"Nobody got in touch with this administration . . . That is not a proper way to do business," Barry said. He sid city officials would try to meet soon with Fannie Mae to resolve the issue.

Fannie Mae spokeswoman Beth VanHouten said the firm had only cut off D.C. fundings "as a last resort." But she said the firm felt that "we could be on safe ground" without holding to the current permanent interest ceiling of 11 percent, a rate at which lenders currently refuse to make loans.

Loans for construction of commerical buildings here are not affected by the funding cutoffs because Fannie Mae and Freddie Mac deal only with residential financing. Construction of most office buildings here is financed by loans from large insurance companies.