NAIROBI, Kenya — More than 40 African countries signed a free trade pact on Wednesday that the nations hope will fulfill a long-held dream of greater economic integration on the continent.

But among the holdouts are two of Africa’s biggest economies, Nigeria and South Africa, raising concerns about whether the agreement can make good on its promises.

The African Continental Free Trade Area, which has been in the works for two years, aims to unite participating countires into a single trading market that would be one of the largest free trade zones in the world since the World Trade Organization was created in 1995.

Of Africa’s 55 countries, 44 signed the pact.

“Amongst African states in general, there has long been a hankering for a trade agreement that transcends national boundaries,” said John Campbell, a senior fellow and Africa expert at the Council on Foreign Relations in New York. “In Africa more than any other part of the world, national boundaries are seen as artificial, essentially as a colonial imposition.”