But other types of trade agreements have emerged that give companies rights.

Such treaties are intended to promote prosperity by reducing trade barriers and protecting investors from expropriation by foreign governments. They allow companies to sue directly, instead of having to persuade a state to take up their case. They have proliferated since the 1990s, and number around 3,000, up from a few hundred in the late 1980s, according to Robert Stumberg, a law professor at the Harrison Institute for Public Law at Georgetown University, whose clients include antismoking groups.

In Africa, at least four countries — Namibia, Gabon, Togo and Uganda — have received warnings from the tobacco industry that their laws run afoul of international treaties, said Patricia Lambert, director of the international legal consortium at the Campaign for Tobacco Free Kids.

“They’re trying to intimidate everybody,” said Jonathan Liberman, director of the McCabe Center for Law and Cancer in Australia, which gives legal support to countries that have been challenged by tobacco companies. In Namibia, the tobacco industry has said that requiring large warning labels on cigarette packages violates its intellectual property rights and could fuel counterfeiting.

Mr. Cooper, of British American Tobacco, whose local affiliate sent the government a legal opinion, said in an email that countries should “consider the broader context of implementing regulations that can impact trade.”

Thomas Bollyky, a trade lawyer and a fellow at the Council on Foreign Relations, said many developing countries are at a disadvantage in investment cases because they do not have the specialized legal expertise or resources to fight.

Uruguay has acknowledged that it would have had to drop its tobacco control law and settle with Philip Morris International if the foundation of the departing mayor of New York, Michael R. Bloomberg, had not paid to defend the law. (The company’s net revenue last year was $77 billion, substantially more than Uruguay’s gross domestic product.) Even developed countries like Canada and New Zealand have backed away from planned tobacco laws in the face of investment treaty claims, Mr. Bollyky said.

The most closely watched legal battle is playing out in Australia, where the tobacco industry lost a case in domestic courts last year. Philip Morris International has filed suit under an investment treaty between Australia and Hong Kong, where the firm has a branch. The proceedings, which are not public, will be held in Singapore and decided by outside arbitrators, not judges.