US Secretary of State John Kerry and Kenya's President Uhuru Kenyatta discussed on Monday ways to counter the threat from the al Shabaab militant group that killed 148 people at a Kenyan university last month.
Kerry, who arrived on Sunday, also commemorated the 1998 bombing of the US embassy in Nairobi, in which more than 200 people died, before meeting Kenyatta.
His Kenyan counterpart Amina Mohamed said last month that Nairobi wanted more help with intelligence and security measures from U.S. and European allies to prevent further attacks by the radical Somali movement.
The United States, along with other Western states, already provides training and other support for the security forces.
"We do have the power to fight back, not only with our military and law enforcements, but also with something that may be more powerful and make a bigger difference in the end, and that is our unity," Kerry said before laying a wreath at site of the former embassy.
"The only place for al Qaeda, al Shabaab, Boko Haram and others is in the past," he added.
Kerry met for an hour and a half with Kenyatta at State House, the last 30 minutes without any aides. "It was a good meeting," he said without giving details.
Kenyatta's spokesman said on Twitter that security issues and investment and trade were the focus for talks. A planned visit by President Barack Obama to Kenya later this year was also discussed, he said.
A US official said Kerry raised concerns about the Kenyan government's threat to close the Dadaab refugee camp, home to about 335,000 Somali refugees. Nairobi says it is a security threat but Washington has said it does not agree.
The Kenyatta government has given the United Nations three months to close the camp. Repatriating refugees without their consent to areas where their lives would be threatened would be a breach of international law.