The sale will mean a cut of about 2 billion pounds ($2.55 billion) in Barclays' risk-weighted assets.
Britain's Barclays has completed the sale of its Egyptian business to Morocco's Attijariwafa Bank as part of its shift towards focusing on the United States and Britain.
The sale will mean a cut of about 2 billion pounds ($2.55 billion) in Barclays' risk-weighted assets, it said on Tuesday, boosting the bank's core capital ratio by about 0.1 percent.
Barclays did not give a price for the transaction, although sources previously told Reuters they valued the business at around $400 million.
The London-based lender is seeking to sell its African operations as part of a plan by Chief Executive Jes Staley to simplify its structure and improve shareholder returns.
However, attempts to sell the African businesses as one have come up against difficulties, including the disparate nature of the local units, the biggest of which is Barclays Africa Group, mainly made up of former South African bank ABSA.
Barclays successfully sold a 12 percent chunk of its holding in the South African bank in May, but talks to sell a bigger holding in the business have so far not yielded a deal.
Former Barclays Chief Executive Bob Diamond's bid to buy Barclays Africa Group as part of a consortium was dealt a blow by the withdrawal of Carlyle Group earlier this year.
Reuters reported Attijariwafa's interest in March, as the Moroccan lender's general manager told Reuters he planned to expand in Egypt.
Barclays shares were up 1.4 percent at 1500GMT, in line with an increase in the broader STOXX European banks index.