Two American presidents will come together here Tuesday to lay a wreath at the U.S. Embassy during a solemn ceremony that will commemorate a terrorist bombing 15 years ago — and serve as a stark reminder of present-day security concerns in Africa.

Neither Barack Obama nor George W. Bush had come to power at the time of the attack, but the simultaneous destruction of the U.S. diplomatic headquarters by coordinated truck bombs in Tanzania and Nairobi, Kenya, on Aug. 7, 1998, affected their tenures in the White House. The attacks, which killed hundreds, brought Osama bin Laden to wider public attention and signaled a new level of sophistication in the radical Islamist movements that pose a terrorist threat worldwide.

As President Obama wraps up a week-long trip to Africa, the embassy ceremony will highlight how significant sub-Saharan Africa has become to the administration’s efforts to fight back. Under Obama, military and security engagement with Africa has expanded significantly, with the rapid growth of military personnel on the continent.

AFRICOM, the U.S. command, has grown to 2,000 staff members assigned to Africa since its founding in 2007, under Bush, and up to 5,000 troops are conducting various missions on the continent at any given time.

The ramping up of counterterrorism operations, accelerated under Obama, is small compared with U.S. military engagement in other parts of the world. But many Africans have faulted the Obama administration for viewing the continent largely through the prism of national security, even as the president has tried this week to turn attention to trade, development and democracy.

“It’s really true that AFRICOM has been a key partner to a number of African countries,” said Ben Rhodes, Obama’s deputy national security adviser. But, he said, “the focus of AFRICOM has been on building African capacity, not on bringing U.S.-based military solutions to African problems.”

During Bush’s presidency, bin Laden’s success in helping to plan the 1998 bombings emboldened him to carry out the attacks of Sept. 11, 2001, leading Bush into the wars in Iraq and Afghanistan and a worldwide battle against terrorism. The threats posed by al-Qaeda and its affiliates in Africa have increased during Obama’s tenure, as the U.S. military winds down its presence in Afghanistan and ended combat operations in Iraq.

The continent is marked by weak governments, large ungoverned spaces and crippling poverty, ingredients that have allowed Islamist extremism to spread.

In 2009, Obama’s first year in office, the primary concern was Somalia’s al-Qaeda-linked al-Shabab militia. Today, the list of extremist groups includes al-Qaeda in the Islamic Maghreb, the terrorist network’s branch in West and North Africa, and Nigeria’s Boko Haram Islamist militia, as well as smaller extremist factions.

The Obama administration also has expanded U.S. military involvement in the hunt for Joseph Kony, the Ugandan warlord whose forces have kidnapped thousands of children, forcing them to fight or into sexual slavery. Last year, Kony was the subject of a massive American grass-roots activist campaign to raise awareness about his crimes and pressure the U.S. and African governments to try to capture him.

Richard Downie, the deputy director of the Africa Program at the Center for Strategic and International Studies, points out, however, that the U.S. military presence in Africa remains modest. It has an annual budget of about $250 million, and the AFRICOM headquarters is in Stuttgart, Germany. The largest U.S. military footprint is in Djibouti, on the fringes of the continent — where it can keep watch over Yemen — and Obama has shown no appetite for sending U.S. combat troops into regional conflicts, such as in northern Mali.

“What I would add, however, is that AFRICOM’s assets remain substantial when compared with those being deployed by some of the civilian arms” in Africa, Downie said. “It’s striking, for example, on a trip where expanding trade with Africa is top of the agenda, that the Department of Commerce has only six foreign commercial service officers stationed in the whole continent. When you have this kind of mismatch between military and civilian resources, there’s always a danger of policy becoming ‘securitized.’ ”

U.S. Special Forces soldiers are now in several countries, training African militaries, including 100 dispatched to help Ugandan soldiers try to track down Kony. Arms sales to African allies and military training programs also have grown, as has a U.S. naval presence off the continent’s eastern and western coasts.

The use of aerial drones in Africa has been a hallmark of the U.S. military under the Obama administration. Drones have been deployed by U.S. forces stationed in Djibouti against al-Qaeda’s affiliate in Yemen as well as in Somalia. And this year, a new base for unmanned drones was opened in Niger to track down extremists in West and North Africa, adding to U.S. drone bases in Ethiopia and the Seychelles.

Obama has mentioned little of this during his tour through Senegal, South Africa and now Tanzania. During a news conference here Monday, a Tanzanian reporter asked him whether the United States would intervene in ongoing fighting and civil unrest in the Congo. He responded that the administration works with the United Nations on peacekeeping, but that “ultimately, the countries involved have to recognize it is in their self-interest to do so. We can’t force a solution onto the region.”

Still, experts said the U.S. presence is likely to continue to grow. The appointment of Susan E. Rice as national security adviser could mean that the Obama administration would continue to gauge the continent through a security and national interest paradigm, according to the Soufan Group, an international strategic consulting firm.

Rice, the group notes in a June 18 intelligence brief on Obama’s Africa policy, played a key role in persuading former president Bill Clinton’s administration not to intervene in the Rwandan genocide, a decision that made her a leading advocate for interventionism.

“The Administration will remain focused on the national security threat posed by the growth and threat of Islamist militant groups in Africa,” the Soufan Group wrote, “and on protecting relations with key national allies, regardless of their democratic credentials.”