Prince George's Doctors' Hospital and a major health care investment firm have reached an agreement for the purchase of the Lanham hospital, officials said yesterday.

Neither side would release the purchase price. However, an official for the buyer, American Medical International, said the corporation will comply with an order by the state cost review commission to lower the hospital's rates to make up $21 million in "excessive" charges.

The 13-year-old Doctors' Hospital will be the first Maryland hospital to be owned by a major health care investment group. AMI, based in California, owns about 140 hospitals in the United States and abroad.

Edmond Curran, AMI vice president for development, said yesterday he expected to have a new management team in place within a few weeks. He said a title search, license transfer and bill collections must be completed before the parties sign the deal in about 120 days.

Curran said Doctors' was a "mixed blessing" for AMI. While he praised it for its "efficacious, high quality care," he added that bad publicity in recent years on the part of the previous owners has been "a stumbling block."

Last year the hospital board, led by principal owner Dr. Leon Levitsky, tried unsuccessfully to file for bankruptcy after the Maryland Health Services Cost Review Commission ruled that the hospital had to reduce future charges.

Curran said that AMI has agreed to take on the responsibility of paying back those overcharges. He said the cost review commission will decide next month what Doctors' Hospital will be allowed to charge for services.

Levitsky could not be reached for comment yesterday. He is quoted in an AMI press release as saying, "AMI has had a commitment to high quality patient care for 25 years, and of all the investment companies, we have found AMI to be the most community oriented."

Curran said yesterday that AMI also is pursuing a proposal to purchase George Washington University Medical Center, but he said that if AMI bought the teaching hospital, there would be no particular connection between it and Doctors'.