<span>the wars against Carthage changed Rome. which The Senate had gained in power and prestige relative to the people's assemblies, the Comitias Plebis. The Romans emerged from the Punic wars with the widespread understanding that ultimate authority over the military lay with the Senate, that it was the Senate's job to know, advise and guide, and the Senate's job to decide the question of war or peace and other foreign policy matters.</span>
They had been allies sense 1879 under the agreement that the German empire would protect/help them if Russia were to ever attack and vice-versa. About 3 years later Italy also joined the alliance to create the Triple alliance in WWI
I hope this helps!!!