"X. Having kept his things safe and tricked all the Cretans, [Hannibal]] travelled to Prusias in Pontus. At his court, he maintained the same attitude towards Italy and worked to achieve nothing other than to arm the king and campaign against the Romans. When he saw that Prusias' domestic resources were less than firm, he made overtures to the other kings; he added war-like peoples. The Pergamene king Eumenes, a very good friend of the Romans, opposed him and war was waged between them on land and sea. But on both, Eumenes did better on account of his alliance with the Romans. For this reason, Hannibal wanted to crush him even more, judging that if he removed him, everything else would be easier for him. In order to kill him, he initiated this plan. They were a few days away from having a naval battle. He was at a disadvantage in the number of ships; the battle was to be fought by a trick, since he was not a match for him in forces. He commanded that a great number of live venemous snakes be collected and stuffed into earthen jars. When he had produced a great number of these (on the same day on which he intended to have the naval battle), then he called together the captains and instructed them all to rush at the one ship of King Eumenes and that they should consider it enough just to defend themselves against the other ships. He promised that they would easily achieve this by means of the great number of snakes, but that he would ensure that they knew which ship the king was in, and that, if they captured him or killed him, there would be a great reward for them.
XI. After the exhortation of the troops, the fleets were led into battle by both sides. When they were drawn up in a line, before the sign was given to attack, in order to make clear to his forces where Euemenes was, sent out a letter-carrier with an official staff in a dinghy. When he reached the enemies' ships, he showed them a letter, claimed that he was seeking the king and was immediately led to the king, because no one suspected that it was anything other than a letter about peace. When the the ship of the commander had been indicated to them, the letter-carrier withdrew to place he had set out from. But when the letter was opened, Eumenes found nothing in it, except [insults] intended to enrage him. And yet he did not wonder about the reason for this or realise what it was; instead he did not hesitate to join battle immediately. In accordance with Hannibal's instruction, the Bithynians charged at Eumenes' ship alogether in a rush. Since the king could not withstand the power of their assault, he sought safety by flight, which he would not have achieved, had he not withdrawn into his encampment, which was located on the nearby shore. When the rest of the Pergamene ships were pressing heavily on their enemies, suddenly the earthen jars which we made mention of above began to be thrown into their midst. When these were thrown, at first, they spurred the combatants to laughter, since they could not understand why they had done this. But then they realised that their ships were full of snakes. They were completely terrified by this unprecedented thing and, since they did not know [which] was the most important to avoid, they turned tail and withdrew to their naval base. Thus Hannibal overcame the forces of the Pergamenes by a strategem, and not just on that occasion, but often at other times he defeated enemies with land forces by means of similar tactical skill."
Source: https://en.m.wikisource.org/wiki/Translation:Lives_of_the_Eminent_Commanders/Hannibal starting at X.