Forty-nine Ivorian soldiers were arrested at the airport in Mali's capital Bamako in July, three of whom were later released.
They were charged with attempting to undermine state security in August and convicted at a trial that began on Thursday and ended on Friday ahead of a Jan. 1 deadline set by ECOWAS, West Africa's main political and economic bloc, to release them or face sanctions.
Their arrests led to a diplomatic dispute between the neighboring countries and widespread condemnation from regional allies.
Mali's ruling junta said the soldiers were acting as mercenaries, while Ivory Coast said they were part of a United Nations peacekeeping mission.
Ivory Coast said its troops were being held hostage, and has made repeated pleas for their release. The country announced last month it would withdraw its remaining soldiers from the U.N. peacekeeping mission.
One of Africa's most volatile countries, Mali has for a decade relied on regional allies and peacekeepers to contain Islamist insurgents who have killed thousands of people and taken over large areas of central and northern regions.