Nairobi: Some African activists have greeted President Barack Obama's remarks that Ethiopia has a democratically elected government with scorn and concern.

Obama made the comment yesterday during a news conference with Prime Minister Hailemariam Desalegn of Ethiopia, whose ruling party won every seat in parliament in May elections.

Today, Obama urged African leaders to uphold democratic rights in a speech delivered from the headquarters of the African Union before he departed Ethiopia to end a two-nation African trip that included a stop in Kenya.

"Yesterday he was a tricky and mischievous politician," Yonathan Tesfaye, a spokesman for Ethiopia's opposition Blue party, said in a reference to Obama's comment that Ethiopia's government was democratically elected.

"And today he has become a passionate inspirational human rights activist," Tesfaye said, citing Obama's remarks to the African Union. "Which one should we believe? Which one should we go with?"

Merara Gudina, a leading opposition figure in Ethiopia, said he was doubtful that the United States would push hard for democratic change in his country and expressed concern that Obama's visit would end up being "another public relations exercise."

Human rights groups have criticized Obama for visiting Ethiopia, saying his trip lends legitimacy to an oppressive government. Ethiopia is the world's second-worst jailer of journalists in Africa, after Eritrea, according to the Committee to Protect Journalists.

Hailemariam, the Ethiopian prime minister, has defended Ethiopia's commitment to democracy and said the country needed "ethical journalism," not reporters that "pass the line" and work with "terrorist groups."

At the news conference yesterday, Obama said: "Our policy is that we oppose terrorism wherever it may occur. And we are opposed to any group that is promoting the violent overthrow of a government, including the government of Ethiopia, that has been democratically elected."

Obama's comment illustrates how the US is becoming "out of touch with African realities," such as the seemingly inevitable electoral victories of ruling parties whose power is entrenched, said Angelo Izama, a Ugandan analyst who runs a policy and security research center called Fanaka Kwawote.

"It was kind of ironic that Obama was singing the praises of democracy in Ethiopia while ignoring its flaws there," Izama said.

During his visit, Obama urged Ethiopia to widen freedom of expression and other democratic rights.