Carvajal has repeatedly denied the charges against him and his troops
A Colombian army colonel and 14 other soldiers have received prison sentences of up to 54 years for the killing of 10 undercover police officers in 2006.
Former Lt Col Bayron Carvajal was given 54 years for ordering the ambush near the southern town of Jamundi.
The police were lured to a medical centre by an informant who told them there was cocaine hidden there.
When the undercover officers arrived, they and the informant were shot dead. No drugs were ever found.
Carvajal, who was not at the scene of the massacre, said he thought his troops were attacking leftist rebels who were working with drug traffickers.
Officials said inquiries suggested links between Carvajal's troops and drug gangs operating in the region.
At Wednesday's hearing in Cali, some of the defendant's relatives broke into sobs when the sentences were read out, the Associated Press news agency reported.
Carvajal's second-in-command, former Lt Harrison Castro, was sentenced to 52 years.
The other soldiers involved were each given 50 years.
The incident was initially thought to be a friendly fire accident
Prosecutors had called for the maximum of 60 years in prison for the convicted soldiers.
The dead officers belonged to an elite unit of Colombia's judicial investigative police, and had trained in the US.
A long-running conflict in Colombia - the world's largest cocaine producer - between leftist rebels, security forces and right-wing militias has left tens of thousands of people dead.