White House officials said yesterday that President Bush is almost certain to veto legislation passed by Congress last month to revise the Orphan Drug Act, the controversial law that grants market monopolies to companies producing drugs for rare diseases.

The legislation will be killed by "pocket veto" unless the president signs it by midnight Saturday. It was designed to close loopholes in the orphan drug law that had allowed companies to reap enormous profits from drugs that turned out to have a bigger market than originally predicted, such as AIDS treatments.

The amendments represented a compromise between lawmakers and industry, and had also won strong endorsements from public-interest groups. They would have created exemptions to the broad privileges granted by the Orphan Drug Act, attempting to remedy what critics had said was a law that permitted price gouging and unfairly restricted competition.

But in a move that angered congressional leaders and shocked some public-interest groups, administration officials said yesterday that the president would not sign the legislation because of objections raised by Health and Human Services Secretary Louis W. Sullivan and other White House officials.

A spokesman for HHS confirmed yesterday that Sullivan had advised the president on the Orphan Drug Act amendments, but would not comment on their discussions.

"I am shocked that the president would be considering a veto of this carefully worked out compromise . . . " said Rep. Henry A. Waxman (D-Calif.), the chief architect in the House of the Orphan Drug Act changes. "A veto would mean that only the rich would be able to afford these drugs."

The original Orphan Drug Act states that any company that develops a drug for a rare disease is eligible for a seven-year marketing monopoly, during which the Food and Drug Administration will approve no other drug for the same disease.

The bill is generally credited with spurring the development of dozens of potentially life-saving medications, which otherwise would have not made economic sense for drug companies to develop. But in recent years the original law has been repeatedly criticized on two points.

The first is that when a drug is very expensive, it can be quite profitable even if very few patients need it. For example, human growth hormone was developed to treat dwarfism, a disease afflicting only a few thousand children in the United States. But because a year's worth of treatment costs $10,000, what appeared to be a small market is actually worth more than $100 million annually.

A market that large, some critics have argued, doesn't need exclusive rights to encourage drug development, and a marketing monopoly only serves to drive up the drug's cost further by preventing competition.

In addition, critics maintained that the bill's defintion of a rare disease -- one affecting fewer than 200,000 patients -- was too inflexible. AIDS, for example, began as a rare disease but has since outgrown the limit. Does a company granted a monopoly for an AIDS drug when there were only 50,000 AIDS patients still deserve protection today?

The congressional compromise addressed both questions. First, it allowed a company to share a market with the maker of an orphan drug if the second company could prove it was developing the product at the same time. The intention was to allow competition in markets that have enough profit-making potential to attract more than one company.

The second provision stated that once the number of patients affected by a disease surpassed 200,000, any other company could enter the market.

The bill was greeted warmly by AIDS activists and other advocacy groups. It had the approval of the major pharmaceutical trade association, which accepted the final version after compromises.

But administration offiicals said yesterday that they were worried that the loosening of marketing monopolies would discourage some firms from developing treatments for rare diseases at all. Sullivan, according to administration sources, was also concerned about sections of the bill that mandated the establishment of a special orphan drug office within his department.