(CNN) -- U.S. Secretary of State John Kerry took exception with Nigeria's human rights record Saturday, but at the same time he defended that government's right to defend itself against terror groups disrupting Africa's most populous nation.
In his first visit to sub-Saharan Africa since taking office earlier this year, Kerry singled out Nigeria's Boko Haram as "a terrorist organization," though the United States doesn't formally list the Islamist militant group as such.
"One person's atrocity does not excuse another's," Kerry said, visiting the region on the day it celebrated the 50th anniversary of the African Union.
Kerry noted that Boko Haram has "wantonly upset the normal governance of Nigeria in fundamental ways that are unacceptable." Then he endorsed Nigeria's right "to defend itself and to fight back against terrorists."
But Kerry said he has raised "the issue of human rights" with Nigeria's foreign minister.
"We have talked directly about the imperative of Nigerian troops adhering to the highest standards and not themselves engaging in atrocities or in human rights violations. That is critical," Kerry said.
"To their credit, the government has acknowledged that there have been some problems and they're not -- they're working to try to control it," Kerry continued. "Revenge is not the motive. It's good governance. It's ridding yourself of a terrorist organization so that you can establish a standard of law that people can respect. And that's what needs to happen in Nigeria."
Human Rights Watch reported this month civilian deaths and abuses by Nigerian forces in its campaign against Boko Haram. The conflict between the military and insurgents was evident more than a week ago when special forces targeted Boko Haram and other groups, killing 14 suspected terrorists and capturing 20 others.
However, much of Nigerian violence in recent years has been blamed on Boko Haram, which means "Western education is sacrilege."
Last week, a spokesman for the United Nations human rights commissioner told reporters that Boko Haram could face war crimes charges for alleged ethnic and religious cleansing in Nigeria. Last December and January, the Islamist group killed 34 people, including 27 Christians attending Christmas services, officials said. Also, Human Rights Watch said the Islamist group has killed more than 2,800 people in an escalating campaign to impose strict Islamic law on largely Muslim northern Nigeria.
Nigeria, with nearly 175 million people, is considered the political and economic powerhouse of West Africa. Rich in oil, the country is a key U.S. partner.
Kerry, making his remarks in the African Union headquarters in Ethiopia, said the United States is working closely with the union on economic development and bilateral trade issues. The African Union was formed to rid the continent of colonialism and apartheid and to promote cooperation for development.
But Kerry also expressed concern about peace stability in the region, including between South Sudan and Sudan, whose situation "remains tense," Kerry said.
Kerry will be soon appointing a special envoy to Sudan and South Sudan, he said.