The first battle of Cirta (winter 106-105 BC) saw a Roman army under Marius narrowly escape from an ambush led by Jugurtha and his ally Bocchus (Jugurthine War).
The main recorded campaign of 106 saw Marius campaigning in the far western part of Jugurtha's kingdom of Numidia, close to the border with Mauritanian, where he captured a fortress close to the Muluccha River. After this success Marius marched east back towards eastern Numidia, ready to go into winter quarters. Jugurtha doesn't appear to have interfered in the siege at the Muluccha, and Marius probably believed that his enemy was a spent force.
This was a mistake. Jugurtha was in a fairly desperate position, but he still had an army of Gaetulian mercenaries, and a potential ally in Bocchus, king of the Mauri. Bocchus had joined the war against Rome before Marius took command, but hadn't played an active part in the fighting. In an attempt to convince him to fight, Jugurtha now offered to give Bocchus one third of his kingdom if the war ended with the Romans expelled from Africa, or without Jugurtha losing any territory. The new offer did indeed motivate Bocchus to fight, and his army played a major part in the two final battles of the war.
We have two very different accounts of the first battle of Cirta, one from Sallust and the second from Orosius. Sallust was writing around fifty years after the events of the battle, Orosius around five hundred years after the events he was describing, suggesting that Sallust's account is more likely to be true.
According to Sallust Jugurtha and Bocchus managed to surprise the Romans. Marius's scouts reported that they were close by just as the attack began, giving the Romans no time to get organised. The result was a chaotic melee, with Jugurtha's cavalry slashing through the Romans, who were outnumbered. Slowly some order was restored, partly by the troops themselves, who formed into a number of defensive circles, and partly through the efforts of Marius, who led his elite personal bodyguard to the danger spots. The battle began late in the day and it soon began to go dark. Marius ordered his men to take command of two nearby hills. Sulla with the cavalry was ordered to guard the smaller hill, which had a large spring of fresh water, while Marius gathered the infantry on the larger and steeper hill. A combination of darkness and the strength of the new Roman position forced the kings to call a halt to their attack.
Marius decided to try and surprise Jugurtha early on the following morning. He ordered his men to spend the night in silence, while Jugurtha's men are said to have spent most of the night awake. Just before dawn Marius ordered all of his musicians to signal an attack, and his men launched a surprise attack that caught Jugurtha's men entirely by surprise. The Romans won a total victory, killing more of the enemy than in any other battle and completely routing Jugurtha's army.
There are generally considered to be two flaws with this account. The first is that Jugurtha was too experienced a commander to be caught out by a dawn attack, which was a fairly standard tactic. The second is that Jugurtha clearly didn't suffer that many casualties, as only four days later he was able to launch another large scale attack on the Romans (second battle of Cirta). It is possible that Jugurtha didn't have a great deal of command of his army after the chaotic cavalry battle, especially as he appears not to have had any Numidian troops, and was instead relying entirely on his mercenaries and allies. Numidian casualties in the earlier battles of the war are normally said to have been rather low, with the Numidians fleeing once it was clear they had been defeated, so Jugurtha could still have lost more men than in any early battle and kept a large force.
Orosius begins with the Romans besieging Cirta. Jugurtha attacked with 60,000 cavalry. The Romans struggled to deal with this threat, and for three days were surrounded by whirling crowds of dart throwing cavalry who they were unable to catch. On the third day Marius decided to make a desperate attempt to break out of the trap, and ordered his men to attack all along their lines. Jugurtha's cavalry continued to circle around them, picking off the Romans from a distance. The Romans were close to defeat when a heavy rain storm began. The rain made the African's slings unusable, and also soaked their elephant hide shields, making them unusable. Bocchus and Jugurtha fled from the scene, and Marius escaped from the trap.
In both cases the Romans were ambushed, found themselves in serious difficulties and were saved largely by luck. Marius appears to have been over-confident before the battle, but in Sallust performed well once the fighting had begun. In Orosius his only contribution was to order the desperate final attack, which had failed before the rain saved the day.
Orosius provides very little details of the rest of the campaign, only saying that Jugurtha and Bocchus attacked with 90,000 men and were defeated, this time suffering very heavy losses. Sallust gives more details. Marius resumed his march towards winter quarters, but now taking more precautions against a second attack, suggesting that he was aware that most of Jugurtha's army was still intact. Four days later the kings attacked again and once again come quite close to success before being defeated (second battle of Cirta). After this Bocchus realised that the war was lost, and in return for a Roman pardon betrayed Jugurtha and handed him over to a Roman party led by Sulla, ending the war.