
The four soldiers were part of a unit conducting a routine patrol through the city.
The bomb, hidden in a metal box, was tied to a motorbike and parked near a stall where pork were being sold.
Police said they believe the explosive was set off remotely, possibly by mobile phone.
The attack on the fresh market came one day after a fierce gunfight between security forces and the militant that started in Bannang Sata district just south of Yala's Muang district. The gunfight ended in the death of six militants. One officer was shot and wounded in the gun battle.
Monday also witnessed more violence in neighbouring Pattani where separatists shot dead a rubber merchant in Panare district, and villagers discovered the corpse of an unknown man in Yarang, believed to be another victim of ongoing violence.
Over the weekend, at least six insurgents wearing military fatigues boarded a train in Yala, shooting dead three railways employees and one policeman.
The incident brought train services in the restive region to a stand still.