Spain's Telefonica SA (TEF) and Portugal Telecom SGPS SA (PT) said Tuesday they had agreed to each sell their 32.18% stakes in their Moroccan telecommunications unit Medi Telecom SA, or Meditel.

Local Meditel shareholders FinanceCom SA, RMA Watanya SA and Fipar Holding, jointly will pay EUR400 million both to Telefonica and to Portugal Telecom, according to filings in the Spanish and Portuguese stock market regulator.

The Moroccan telecommunications regulator still needs to approve the sale.

Telefonica expects the transaction to be completed by the end of the year.

Company Web site: www.telefonica.com

-By Bernd Radowitz, Dow Jones Newswires, 34 913958120, djmadrid@dowjones.com