But Ecowas leaders meeting in Liberia said the implications of its membership still needed to be considered before Morocco could formally join.
King Mohammed VI was not at the summit because Israel’s Prime Minister Benjamin Netanyahu had been invited.
Morocco left the continental body in 1984 after it recognised the independence of Western Sahara.
Morocco regards Western Sahara as part of its historic territory and has spent much of the last three decades trying to strengthen ties with Europe at the expense of relations with Africa.
Ivory Coast President Alasanne Ouattara has confirmed that the decision had been agreed in principle but the details still had to be worked out.
Morocco, along with Tunisia which is seeking observer status with the organisation and Mauritania, which wants to return to the body, will be invited to the next meeting of heads of state in Togo in December, a senior Ecowas source told the BBC. ‘I believe in Africa’
It is a continent on the rise.” This trip comes nearly a year after Mr Netanyahu was in East Africa as part of his efforts to strengthen ties between the continent and Israel.
King Mohammed VI last week announced he would not be attending the summit in Liberia, because of the presence of Israel’s prime minister.