The Department of Housing and Urban Development yesterday took control of more than $2 billion worth of federally guaranteed mortgages from York Associates Inc., a Bethesda-based mortgage banking company and the second major Washington area firm to run afoul of the HUD's trouble-plagued coinsurance program.

A HUD spokesman said the agency took the action because York could no longer be relied on to make monthly payments to investors who own government-backed securities tied to the mortgages.

York is one of the largest lenders in the coinsurance program, which was designed to promote rehabilitation and preservation of apartment projects but piled up more than $1 billion in defaulted mortgages before it was shut down earlier this year. The defaults have threatened the solvency of various HUD insurance funds and touched off a series of scandals and investigations that have rocked HUD over the past two years.

In separate statements yesterday, York and HUD officials said they reached an agreement on the government takeover that calls for York to continue collecting whatever payments are made on the mortgages for at least 90 days, passing on the proceeds to holders of securities issued under the name of the Government National Mortgage Association, a HUD financing arm known as Ginnie Mae. Ginnie Mae and other HUD agencies will have to make up any shortfall between what York collects and what is owed to securities holders.

"We've reached this business decision reluctantly and with great regret," John C. York Jr., president of the company, said in the statement. The portfolio turned over to HUD contains mortgages on more than 80,000 rental housing units in 28 states and the District, said the statement. York himself was not available for comment.

HUD placed York Associates on probation last May, saying the government-guaranteed mortgages written by the company already were marked by a high default rate that had "increased significantly" over the last 18 months. York had 57 loans in default at the time of the probation, HUD said, "representing 16.52 percent of its outstanding loans." Probation meant that York had to get the department's written approval before making new loans.

In a recent interview, John York said that HUD's count of his company's defaults is incorrect "to a significant degree" and he disputed the department's assessment that he was holding too many high risk loans.

York came to Washington in April 1973 to work for DRG Funding Corp., which was then making both conventional and HUD-insured loans and would later become the biggest player in the coinsurance program. But in 1980, York left to start his own firm, competing with DRG in a number of areas. Ironically, when DRG was suspended from the coinsurance program last year for what HUD's inspector general claimed were fraudulent activities, its portfolio of government-backed loans was taken over by the government and given to York for servicing. The FBI subsequently launched a criminal investigation of DRG.

"Ginnie Mae is in a delicate position as far as York is concerned," said one lawyer familiar with the coinsurance program. "They obviously sought out York to service the DRG mortgages because they had some degree of confidence in him."

Two years ago, York struck an agreement to sell the mortgage banking firm to Dominion International PLC, a British Holding firm, with the understanding that he would continue to run it, according to documents filed in D.C. Superior Court. After the British company decided not to go through with the deal, York sued, asking for $30 million in damages. The case is still pending.

Ginnie Mae is not the only housing program to begin severing its ties to York. Until June, York also had been active writing loans for multifamily housing through the Federal National Mortgage Association, commonly known as Fannie Mae. Larry Dale, Fannie Mae vice president, said yesterday that while York continues to service its old mortgages, it is no longer permitted to initiate new loans. Dale said Fannie Mae would reevaluate its relationship with York in light of HUD's action yesterday.

Besides his 65 percent stake in York Associates, John York also is listed as principal stockholder and chief executive officer of First Commonwealth Savings Bank of Alexandria, a fast growing savings and loan with about $240 million in assets. Documents filed with federal regulators show First Commonwealth as a well-capitalized, profitable thrift that relies heavily on "jumbo" deposits of more than $100,000 each.