JOHANNESBURG, South Africa — The Obama administration, caught in an awkward bind between its own ambitions on climate change and Africa’s pressing energy needs, is facing the first test of its new guidelines discouraging coal-fired power projects in developing nations.

The United States and Nigeria on Tuesday signed an agreement, setting up a bi-national commission aimed at helping the west African state promote good governance and fight corruption. Secretary of State Hillary Clinton called the U.S.-Nigeria relationship “absolutely critical.”