The case twists around an emerging multibillion-dollar market trading carbon-credits under the Kyoto Protocol, which contains mechanisms for outsourcing environmental protection to developing nations.

The company involved, New Forests Company, grows forests in African countries with the purpose of selling credits from the carbon-dioxide its trees soak up to polluters abroad. Its investors include the World Bank, through its private investment arm, and the Hongkong and Shanghai Banking Corporation, HSBC.

In 2005, the Ugandan government granted New Forests a 50-year license to grow pine and eucalyptus forests in three districts, and the company has applied to the United Nations to trade under the mechanism. The company expects that it could earn up to $1.8 million a year.

But there was just one problem: people were living on the land where the company wanted to plant trees. Indeed, they had been there a while.

“He was a policeman for King George,” Mr. Bakeshisha said of his father, who served with British forces during World War II in Egypt.

Mr. Bakeshisha, 51, said he was given land in Namwasa forest in Mubende district in 1997 by a local kingdom through his father’s serviceman association. Mr. Bakeshisha lived happily on the property for years, becoming a local administrator and ardent supporter of President Yoweri Museveni. In a neighboring district, people had been living on land the company would later license since the 1970s.

Tensions brewed. The company and government said the residents were living illegally in a forest. Residents said they had rights. Community members took the company to court in 2009 and a temporary injunction was issued, barring evictions. Nevertheless, Oxfam and residents say, evictions continued.