MedImmune Inc., the Washington region's most successful biotechnology company and one of the few in the country earning profits, said yesterday that it will buy a small Pennsylvania drug company to get a toehold in cancer and AIDS treatment.

The deal to buy money-losing U.S. Bioscience Inc. of West Conshohocken, Pa., would be worth $401 million at Tuesday's closing price for MedImmune shares. The terms are subject to adjustment later.

MedImmune, of Gaithersburg, is a darling of Wall Street, its shares having more than tripled over the past year as it benefited from rapidly rising sales of a new drug that prevents a severe respiratory infection in premature babies. Yet investors were worried. While MedImmune has several other potential blockbuster drugs under development, they are still several years from being approved, and Wall Street had feared MedImmune was becoming a one-trick pony.

The U.S. Bioscience acquisition goes a long way toward alleviating that concern. MedImmune gets an important drug called Ethyol, which protects the cells of cancer patients undergoing chemotherapy or radiation, and two other approved drugs. In addition, U.S. Bioscience has entered advanced human testing of a drug that may be useful in combating the AIDS virus.

The acquisition jump-starts MedImmune's plans to broaden its focus. "We are delighted with this transaction," Wayne T. Hockmeyer, MedImmune's chairman and chief executive, said in a statement. "This acquisition further solidifies MedImmune's commitment to the field of oncology."

The transaction, unusual for a buyout of this sort, is not expected to hurt MedImmune's earnings in the short term and is expected to lift them in the long term. That seemed to give MedImmune's shares a big boost yesterday. Though the shares of an acquiring company usually fall when a deal is announced, MedImmune's rose $7.18 3/4, or 7 percent, to close at $109.25 in trading on the Nasdaq Stock Market.

U.S. Bioscience shares rose $2.62 1/2, or 23 percent, to close at $14.12 1/2 on the American Stock Exchange.