Washington's Blue Cross and Blue Shield will drop a long-time contract with the Medicare program after settling a dispute over charges that the insurer did a poor job of administering hospital claims for the federal government, officials said this week.

The federal government has contracted with Blue Cross and Blue Shield since the beginning of the program in 1966 to process and pay Medicare claims by area hospitals. Under the contract, the nonprofit insurer has been reimbursed by the government for the administrative expenses of serving as its Medicare "intermediary."

However, the government this spring notified Blue Cross and Blue Shield of the National Capital Area that it planned to terminate its contract at the end of the fiscal year in October.

The government cited Blue Cross and Blue Shield for poor performance, saying the local plan ranked in the bottom fifth of its contractors in quality of service. The principal charge was that the plan did an inadequate job in carrying out audits of local hospitals, the government said.

Blue Cross and Blue Shield executives denied the changes and filed suit in federal court here in May, charging that the government's actions were illegal.

That suit was dropped last month after Blue Cross and Blue Shield agreed to leave the program voluntarily in April 1988. The government also released a statement that said Blue Cross and Blue Shield has provided "commendable service" to the program. The statement did not discuss the dispute.

Barry P. Wilson, Blue Cross and Blue Shield's vice president for public affairs, said the plan had been considering leaving the Medicare program anyway because the claims make up such a small part of the insurer's overall business, making it difficult to achieve efficiencies in administration. The plan incurred administrative expenses of about $1.9 million handling Medicare expenses last fiscal year, out of total administrative expenses of about $140 million.

But, Wilson said, "It's our reputation which is very important to us. We think that we have done a solid job since 1966. Any decision to leave the program should be ours, not somebody else's. And that's what happened."

Louis B. Hays, associate administrator of the federal Health Care Financing Administration, which oversees the Medicare program, said the agency was satisfied with the agreement. "Looking at the entire history, they've been a reasonably good contractor," he said. "More recently their performance has deteriorated rather sharply."

Hays said the agency, which has about 90 contracts with groups to administer hospital or doctor claims under Medicare, rarely terminates contractors. This year, he said, it appears that no contractor will be forced to leave, while last year Medicare terminated two contractors. Blue Cross and Blue Shield organizations around the country provide the vast majority of intermediary service to the government.

Hays noted that the government was spending close to $1.1 billion for contractors' costs and roughly $80 billion on Medicare in general. "When you're talking about that many program dollars and that kind of overhead costs, it would be irresponsible of the federal government not to have really tight controls on the way the contractors do business," he said.

Under the agreement last month, Blue Cross and Blue Shield of Maryland will take over the Medicare business in the District and Maryland suburbs, while Blue Cross and Blue Shield of Virginia will take over coverage in Northern Virginia. Officials on both sides said that neither local hospitals nor more than 300,000 Medicare beneficiaries should notice any difference.

The recent controversy is only the latest in Medicare's intermediary program in recent years, as budget pressures and efforts to tighten regulation of contractors have risen. Last year, for instance, HCFA drew criticism from hospitals and Congress after it sought to have intermediaries delay payments to hospitals in an effort to save money. The agency retreated on the proposal, but it continues to be the subject of complaints by contractors over a variety of new rules it has implemented, according to Jack Emery of the national Blue Cross and Blue Shield Association.

In the Washington dispute, Wilson said the main issue was whether Blue Cross and Blue Shield met the government's targets for recovery from local hospitals through yearly audits of Medicare costs. Wilson said the rules governing these targets have recently been changed, and that the plan unwittingly fell short of the targets last year after it discovered through an audit that it had underpaid Howard University Hospital for some services.

"We were not able to meet criteria of which we were not aware," Wilson said yesterday. He said Blue Cross and Blue Shield believed the government was singling the plan out to test its powers to terminate contractors.

Wilson said as part of the settlement last month, the two sides had agreed not to discuss the dispute. After Hays disclosed the controversy late Thursday, Wilson gave Blue Cross and Blue Shield's position.