Barack Obama’s trip to Ethiopia and Kenya - a first for a sitting U.S. president – is drawing criticism from human rights groups who fear his appearance will give backing to strong-arm governments that have been condemned for squeezing opposition parties, independent media and civil society.

Kenya is considered a valuable U.S. ally in the fight against Islamic terrorism in East Africa. But its campaign against the Somali radical group al-Shabab has been marred by accusations of rights abuses and arbitrary arrests.

Kenyan President Uhurru Kenyatta has also faced crimes against humanity charges by the International Criminal Court for ethnic violence that erupted after the 2007 election. The court dropped the case last December.

The Kenyatta government may be “undermining the new constitution and commitments to international human rights law, under the pretext of promoting national security and combatting terrorism,” a group of 17 international and African human rights groups said in an open letter dated July 14.

“The abusive approach, including unlawful restrictions on civil society and independent media, leads to both ineffectiveness and disenfranchisement thereby undermining the goals of Kenya’s counterterrorism efforts,” the groups said.

Obama will not ignore the human rights issues on his visits, the White House said.

“The president will also stress the importance of strong, democratic institutions, respect for the rule of law, fighting corruption, and our support for open and accountable governance, and respect for human rights across the continent,” said Susan Rice, the White House national security advisor.

“This trip is an opportunity to voice strong support for the vital role played by civil society, as well as to call attention to other important issues, such as the global campaign to combat wildlife trafficking and to stress the importance of equal opportunities for women and girls,” she said.

The Kenyan government is likely hoping that pledges of increased U.S. security assistance - such as weaponry, training or intelligence - will come from the Obama visit, William Mark Bellamy, a former U.S. ambassador to Kenya, told VOA.

Obama’s decision to visit Ethiopia, meanwhile, was called a mistake by some analysts, given the government’s heavy-handed approach to political parties and journalists.

The All Ethiopian Unity Party, one of the major opposition groups, has said 132 of its members have been arrested in recent months, 28 of which were arrested right before, during and after the May legislative elections.

Those elections were swept by Prime Minister Hailemariam Desalegn and this Ethiopian People's Revolutionary Democratic Front, which has been in power for almost 25 years.

Bronwyn Bruton, an Africa analyst with the Atlantic Council, a Washington-based think tank, called Obama’s trip to Ethiopia a mistake.

“The fact that Ethiopia is getting a visit from President Obama in the wake of that guilty verdict and in the wake of sweeping the election, taking 100 percent of the seats, sends a disastrous message to the Ethiopian government,” said Bruton, who has met with Muslim democratic activists in Ethiopia, some who were recently found guilty of terrorism.

Still, U.S. officials say the visit sends an important message.

A senior Obama administration official told VOA the United States regularly urges reforms and communicates its human rights concerns with the Ethiopian government, both in public and in private.

The administration official says the United States believes the Ethiopian government “has inappropriately used its 2009 Anti-Terrorism Proclamation to jail journalists and opposition party members."

When asked why Obama was choosing to travel to Ethiopia, the official said “we engage so that we can urge and shape behavior in these areas.”

Like Kenya, Ethiopia is seen as a key ally, particularly in the fight against al-Shabab, said Jeffrey Smith, of the Washington-based Robert F. Kennedy Center for Justice and Human Rights.

“We’ve seen the cross-border attacks in Kenya, we have seen the havoc they’ve wreaked in Somalia, and Ethiopia is really seen as a bulwark against that, not only in terms of regional cooperation, but by contributing troops to AU [African Union] peacekeeping missions across the continent,” Smith said. “So in that regard, particularly their role in the Sudan crisis, the South Sudan crisis, their role as sort of a regional mediator.”

Ethiopia’s government has also jailed reporters and shuttered independent media outlets in recent years. Ethiopia is Africa’s second worst jailer of reporters, with 11 other journalists and bloggers still imprisoned, according to the Committee to Protect Journalists, a U.S.-based advocacy group.

Earlier this month, one of the most prominent journalists, Reeyot Alemu, was unexpectedly freed from prison after four years behind bars for allegedly plotting terrorist acts, a charge she and her supporters called absurd. Her weekly Amharic newspaper, Feteh, was frequently critical of the ruling party and was shut down nearly two years ago.

Smith argued for that and other reasons, Obama shouldn’t be traveling to Ethiopia, saying it sends the wrong message.

Ahead of the trip, U.S. officials insisted that the president’s visit wouldn’t come at the expense of human rights and media freedoms.

“We value pluralism, we value the right of civil society citizens to be able to speak their minds and represent their views in an inclusive, representative political process, and so we obviously take a dim view whenever those rights are being violated,” State Department spokesman John Kirby told reporters Wednesday.

In Addis Ababa this week, many Ethiopians, like Kenyans, are excited about Obama’s visit, but many also said there’s the danger the president’s visit will be used to justify further government repression.

Many Ethiopians took to Twitter this week to publicize a litany of rights abuses in the country, using the hashtag #EthiopiansMessageToObama.

"Obama's visit comes at a time where Ethiopia is facing many challenges with regards to human rights, democracy and other related fields, even while showing very good progress in economic terms,” said Sisay Tamerat, a university graduate with a philosophy degree, told VOA on Monday.

“Considering the ongoing arrests of journalists and political leaders, I believe the U.S. will find itself an accomplice one way or the other by acknowledging the ruling party with this visit."