But Sall gave no ground. Senegal is "very tolerant," he assured Obama, but is "still not ready to decriminalize homosexuality." Sall said countries make decisions on complex issues in their own time, noting that Senegal has outlawed capital punishment while other countries have not a pointed jab at the U.S., where the death penalty is legal in many states.
Obama's trip, which also includes stops in South Africa and Tanzania, marks the most extensive visit to Africa by the first black U.S. president since he took office. Many Africans have expressed disappointment over Obama's lack of direct engagement with affairs on their continent particularly given that his father was Kenyan and he has many relatives living in Africa yet he was still enthusiastically welcomed.
Thousands of people gathered on the roadways near the presidential palace as Obama's motorcade sped through the coastal city, many in the crowds wearing white to symbolize peace. Some waved homemade signs welcoming Obama, while those gathered near the palace entrance sang and played drums, the rhythmic beats audible from inside the gates.
At Goree Island, the former slave trading post Obama visited later Thursday, local residents waited under scorching sun for hours to catch a glimpse of the president. They sang a song about his return to his ancestral homeland and broke into jubilant cheers as Obama and first lady Michelle Obama walked over to shake hands.
Looming over the festive atmosphere were concerns over former South African leader Nelson Mandela. Obama is due to arrive in South Africa on Friday, though Mandela's precarious condition adds some uncertainty to the agenda.
Obama spoke reverently about the impact that Mandela's struggle against apartheid had on his own activism, as well as about the 94-year-old's influence in Africa and around the world.
"If and when he passes from this place, one thing I think we'll all know is that his legacy is one that will linger on throughout the ages," said Obama, who has sometimes been linked to Mandela given their shared status as their nations' first black presidents.
Mandela's democratic influence in Africa is at the core of Obama's trip. The three countries he will visit were selected as a signal of U.S. support for African nations that have embraced democracy in a region where the legacy of corruption and authoritarianism have been difficult to overcome.
Sall, for example, won the presidency in Senegal last year by ousting an incumbent president who attempted to change the constitution to make it easier for him to be re-elected and for his son to succeed him.
Africa's democratic movements have not been accompanied in most places by equal rights for gays and lesbians. A report Monday by Amnesty International said 38 African countries criminalize homosexuality. In four of those Mauritania, northern Nigeria, southern Somalia and Sudan the punishment is death.
Discrimination against gays is the norm. In Uganda, evictions of homosexuals by landlords occur regularly, says the Amnesty report. Vigilante groups in several countries have posted the names of homosexuals online or denounced them on the radio, forcing them to go into hiding to avoid mob violence. In Senegal, suspected homosexuals who were buried in Muslim cemeteries were disinterred in several towns and villages, and their corpses were dragged through the streets.
On another subject, Obama was pressed in his news conference about the status of former government contractor Edward Snowden, who has acknowledged leaking highly classified documents detailing sweeping U.S. government surveillance programs. The Chinese government let Snowden leave Hong Kong, where he had been hiding, to travel to Russia, where he is now believed to be holed up in the transit zone at Moscow's airport.
Obama dismissed the notion of deploying U.S. military resources to detain Snowden, saying "I'm not going to be scrambling jets to get a 29-year-old hacker."
On still another topic, the president had harsh words for the Supreme Court on its ruling this week that overturned key elements of the Voting Rights Act. Obama declared the decision "a mistake."
"I might not be here as president had it not been for those who courageously helped to pass the Voting Rights Act," Obama said.
The president is being accompanied throughout his trip by wife, daughters Malia and Sasha, and mother-in-law Marian Robinson. Following the president's meetings with Sall, the family boarded a ferry bound for Goree Island, which by some accounts was the center of the Atlantic slave trade.
The Obamas were given a tour of the salmon-colored House of Slaves where Africans were held before being sold into slavery. The president then peered out into the vast Atlantic through the Door of No Return, where shackled men, women and children left Africa, inching across a plank to the hull of a waiting ship.
"Obviously, for an African-American, an African-American president, to be able to visit this site, I think, gives me even greater motivation in terms of human rights around the world," Obama said after his tour.
The president's stop on Goree Island was the first of two visits on the trip highlighting racial change in Africa. The second is scheduled for Sunday at South Africa's Robben Island, where Mandela spent 18 of his 27 years in prison.