PRESIDENT Obama’s recent trip to Africa is a marker of the continent’s progress on freedom, democracy and the market economy.

The continent is by no means universally democratic, but South Africa and Senegal, two of the three countries Obama visited, are two of the continent’s freest, and the third country, Tanzania, is freer than it once was. Most of Africa is at peace, though there remains a problem with terrorism.

The economy of sub-Saharan Africa has been growing at a rate of more than 5 percent. The amount of foreign investment Africa attracts is now almost as large as the amount of aid. Said the president to a business group there: “Everywhere I go in Africa, what’s very clear is people want to break out of a dependency trap.”

Some aid can help. Obama offered a public-private effort on electricity generation. He offered to expand on the successful anti-AIDS effort begun under President George W. Bush. Obama also announced a program to pay for several thousand young African leaders each year to pursue studies at U.S. universities in public administration, business and entrepreneurship.

That is the sort of program that will help Africa and America both. International students return home with personal ties that amount to a large asset to the United States.

The president said he would support the extension of the African Growth and Opportunity Act, a U.S. law that offers trade preferences for manufactured imports from Africa. That law, sponsored by Rep. Jim McDermott, D-Wash., and passed in 2000, will expire in 2015. It should be renewed.

“This is not charity,” Obama said. “This is self-interest.”

Charity is admirable and sometimes necessary, but a relationship of charity is not equal. Again and again, Obama talked of a relationship of equals, based on “trade and partnership.” His African audiences knew what he meant and they were ready to hear it.