is believed to have been behind the attack.
The soldiers were deployed to the area after reports of a shootout between the Gulf Clan and a rival criminal group, Los Caparrapos.
The area is a key transit route for drug being smuggled out of Colombia and has high levels of violence.
What is the Gulf Clan?
Colombia's security forces say the Gulf Clan is the country's most powerful criminal gang. It has extensive international connections and the US Department of State has described it as a "heavily armed, extremely violent criminal organisation".
Led by Dairo Antonio Úsuga, also known as Otoniel, it engages in drug and people smuggling, illegal gold mining and extortion.
The hunt for elusive drug lord Otoniel
US authorities have offered a reward of $5m (£4.1m) for information leading to Otoniel's arrest.
The soldiers were sent to the outskirts of Caucasia where members of the Gulf Clan were clashing with their rivals from Los Caparrapos, an armed group which has tried to wrest control of the gold- and coca-rich area from the Gulf Clan.
The Colombian army says members of the Gulf Clan opened fire on the soldiers as they approached.
The army has sent reinforcements by land and air to go after those responsible for the attack.
How violent is Colombia now?
The largest rebel group in Colombia, the Revolutionary Armed Forces of Colombia (Farc), signed a peace agreement with the government in November 2016.
Most of its fighters disarmed as part of the peace deal and attacks on the security forces diminished.
However hundreds of social activists, land and human rights advocates as well as former members of the Farc have been killed in the years since the deal was signed.
These attacks are mainly thought to be carried out by criminal groups such as the Gulf Clan and Los Caparrapos to silence anyone who dares oppose their drive to control large areas through fear and intimidation.
The peace deal received a further heavy blow last week when four former commanders of the Farc appeared in a video and called on their supporters to take up arms again, arguing that the government had not fulfilled its side of the bargain.
It is not yet clear how many fighters the revived Farc group commands and what its plans are but it has stoked fears that attacks on civilians and security forces could rise further.