Though multilateral agreements on patents allow compulsory licenses for drugs for public health reasons, only a handful of countries, including Brazil and Thailand, have issued such licenses, said Jamie Love, director of Knowledge Ecology International, a Washington group involved with patents and human rights. Most were for AIDS drugs, an area where drug companies have been pressed not to enforce patents.

India is only the second country, after Thailand, to grant a compulsory license to a cancer drug, Mr. Love said.

“The companies have really tried to draw the line very aggressively against cancer and other diseases being included,” he said. The United States government, through trade pressure and trade agreements, has also tried to limit use of compulsory licensing.

The decision on Monday activates a provision of Indian law that has not been tested since the country started granting patents for drugs in 2005. The provision states that a compulsory license may be granted if an invention is not available to the public at a “reasonably affordable price.”

In his decision, the patent controller, P. H. Kurian, said the paltry use of Nexavar in India clearly showed that the drug was unaffordable. He said a compulsory license could be granted because Bayer had not manufactured the drug in India and was treating only a tiny portion of Indians with liver or kidney cancer.

Bayer argued that the reasonableness of the price should reflect the development costs, not only the public’s buying power. It also said a compulsory license was not necessary because an inexpensive version of Nexavar was already being sold in India by another generic company that has said it does not need to recognize Bayer’s patent. Bayer has sued that company, Cipla, which is based in Mumbai, claiming patent infringement in a separate case that is pending.