At least 21 people were killed and dozens wounded after a truck bomb exploded at a police academy in the Colombian capital, the worst attack in Bogota in 16 years.

Colombia' s government declared three days of mourning on Thursday as the blast also injured 68 others. The defence ministry said the "terrorist act" was carried out using a vehicle packed with 80 kilogrammes of explosives.

"Unfortunately, the preliminary toll is 21 people dead, including the person responsible for the incident, and 68 wounded," Colombian police said in a statement, adding 58 of those hurt had been discharged from the hospital.

The defence ministry previously reported 11 dead and 65 injured.

The scene outside the General Santander Police School in southern Bogota was chaotic in the immediate aftermath of the bombing, with ambulances and helicopters rushing to the normally tightly controlled facility.

Fanny Contreras, the Colombian armed forces' health inspector, told local radio the truck "entered [the school compound] suddenly, almost hitting the police, and then there was the explosion".

Hunting down the 'masterminds'

President Ivan Duque ordered reinforcements to Colombia's borders and routes in and out of cities.

"I have also requested that priority be given to all the investigations ... to identify the masterminds of this terrorist attack and their accomplices," he said in an address to the nation.

Right-wing Duque, who assumed power in August, has peddled a tough line against Marxist rebels and drug traffickers in the largest cocaine producer in the world.

Peace talks with National Liberation Army (ELN) fighters - who in the past have claimed responsibility for bomb attacks on police - stalled before Duque replaced Juan Manuel Santos as president, and have not been restarted.

Duque has made several demands, including the release of all hostages, as prerequisites to kick-starting the peace process, but the ELN has dismissed those as unacceptable.

After the 2016 peace accord signed by Santos and Revolutionary Armed Forces of Colombia (FARC) guerrillas - turning the former rebels into a political party - the ELN is considered the last active insurgent group in a country, which has suffered more than half a century of conflict.

'Very sad days'

An Ecuadorian woman was among the dead and the wounded included another Ecuadorian and two Panamanians, the foreign ministry said in a statement.

Witnesses told The Associated Press they heard a loud explosion that destroyed windows in adjacent buildings.

Rafael Trujillo said he was delivering a care package to his son, Gerson, who entered the school two days ago when he was stopped in his tracks by the blast a block away from the school's heavily fortified entrance.

"I'm sad and very worried because I don't have any information about my son," said Trujillo, standing outside the facility, where police officers had set up a taped perimeter. "This reminds me of some very sad days in the past."

Video and photos posted by local media of the scene showed what appeared to be the remains of a vehicle on fire. Windows of nearby buildings had also been shattered.

For decades, residents of Bogota lived in fear of being caught in a bombing by leftist rebels or Pablo Escobar's Medellin drug cartel. But as Colombia's conflict wound down, security has improved and attacks have become less frequent.

In 2016, Santos' government and the FARC signed a landmark peace agreement, which saw members of the rebel group put down their arms.

But peace talks with the ELN have been on and off. Last year, the group accused Duque of trying to "shatter" the peace process.