The worst accident took place in southern Morocco when a truck collided with a passenger bus on a highway near the city of Agadir, the MAP news agency said.
Ten people were burned alive and 22 others were injured, the agency said.
One of the injured was in serious condition and had to be flown by helicopter to a hospital in Marrakesh while the others were treated in Agadir, it said.
In neighbouring Algeria, nine people were killed and 12 injured early today when a bus overturned in M'Silah province south of the capital Algiers, state television said.
Traffic accidents are common in Morocco and Algeria where hundreds die each year on the roads, mostly due to speeding or human error.