DAKAR, Senegal -- President Obama on Thursday called the Supreme Court's decision to overturn the Defense of Marriage Act a "victory for American democracy" and said he had directed his administration to find ways to make sure gay couples received the benefits for which they were now eligible.
"It's my personal belief, but I'm speaking now as a president not as a lawyer, that if you marry someone in Massachusetts and you move somewhere else, you're still married," Mr. Obama told reporters at a news conference here during his second trip to sub-Saharan Africa since taking office. "We're going to be evaluating all these issues."
Standing next to President Macky Sall of Senegal, Mr. Obama also urged African nations that treat homosexuality as a crime, like Senegal, to make sure that gays and lesbians were not discriminated against by the government.
"When it comes to how the state treats people, how the law treats people, I believe that everybody has to be treated equally," Mr. Obama said. The comment prompted a retort from Mr. Sall that his country is not "homophobic" even though its society is not yet ready to decriminalize homosexual behavior.
Mr. Obama spoke on a wide range of subjects in his first news conference since a spate of news back home in the last week. He talked about the court's decision to strike down a part of the 1965 Voting Rights Act; the pursuit of Edward J. Snowden, who leaked documents about National Security Agency programs; and the fragile health of Nelson Mandela, the former South African president.
On the Voting Rights Act, Mr. Obama said the court had made "a mistake" in its ruling, saying the justices had dealt a blow to a law that was "the cornerstone and the culmination of years of struggle, blood, sweat, tears; in some cases, deaths."
He added, "I might not be here as president" if the Voting Rights Act had not been passed into law decades ago.
But the president acknowledged that the Supreme Court had ruled and he urged Congress to "simply make sure that everyone around the country can vote."
On Mr. Snowden, who fled Hong Kong to Russia after revealing that he had leaked sensitive surveillance information, Mr. Obama said he had not personally called the presidents of China or Russia because he did not want to elevate the importance of Mr. Snowden's case. He said other nations should simply be willing to return Mr. Snowden to the United States as a matter of course.
"This is something that routinely is dealt with," Mr. Obama said. "This is not exceptional from a legal perspective. I'm not going to have one case suddenly being elevated to the point where I have to do wheeling and dealing and trading."
Cuba has been reported as Mr. Snowden's next destination, but on Thursday afternoon, a flight from Moscow to Havana took off without any sign that Mr. Snowden was on board. Asked whether he would order the military to intercept any plane Mr. Snowden might travel on, Mr. Obama said he would not.
"I'm not going to be scrambling jets to get a 29-year-old hacker," the president said.
Just a day before Mr. Obama is set to travel to South Africa, he expressed admiration for Mr. Mandela, who is often called Madiba, his clan name, in his own country. He is critically ill and has been hospitalized in Pretoria, South Africa, for weeks.
"I've had the privilege of meeting Madiba and speaking to him," Mr. Obama said. "He is a personal hero. But I don't think I'm unique in that regard. I think he is a hero for the world. If and when he passes from this place, one thing I think we all know is that his legacy is one that will linger on for all the ages."
Mr. Obama formally opened his visit to the African continent at the Palace of the President, where he met with Mr. Sall to discuss opportunities for greater trade and investment that could bolster the economies of both countries.
"I see this as a moment of great promise and great progress for the continent," Mr. Obama said. "All too often the world overlooks the amazing progress that Africa is making."
Mr. Obama arrived at the palace along a driveway lined with palm trees and bright orange flowers. He was accompanied by his wife, Michelle, and greeted at the palace by Mr. Sall and his wife, Mareme Sall.
In his first extended visit to Africa since becoming president, Mr. Obama's motorcade was greeted by throngs of people, including women dressed in traditional white garb to signify peace, in the downtown area of the city. Signs along the route proclaimed, "Welcome Home President Obama."
Some Africans have criticized Mr. Obama for what they say has been a lack of attention and investment in the continent where his father was born. The American president spent one day in sub-Saharan Africa in 2009, delivering a speech in Ghana.
"Africans have been largely disappointed, especially when they look at the focus on Africa by the previous presidents," said Mwangi Kimenyi, a senior fellow at the Brookings Institution. "They therefore have a feeling that President Obama is still not in tune with the emerging continent."
Meanwhile, Chinese leaders have traveled extensively in Africa during the last several years, investing billions of dollars in infrastructure throughout the continent. American officials concede the challenge from China and other countries but insist that America has not been absent.
"China's paying a lot of attention to Africa," Mr. Obama said in his news conference. "Brazil, Turkey, India, are heavily invested in trying to expand trade and commerce with Africa."
Mr. Obama expressed frustration with questions from reporters on topics other than his trip. He said that too often Africa is "not focused on by our press and our leadership back home, unless there's a crisis."
White House officials said the president's trip would provide an opportunity for American businesses to increase their investments in African countries and to bolster trade with their counterparts on the continent.
"We, frankly, have heard a high-demand signal from the U.S. private sector for us to play an active role in deepening our trade and investment partnerships in Africa," said Ben Rhodes, Mr. Obama's deputy national security adviser.
Ellen Barry and David M. Herszenhorn contributed reporting from Moscow.world
This article originally appeared in The New York Times.