After laying down the Dictatorship, Cæsar went in December to Brundusium, where he had previously ordered his troops to assemble. He had lost many men in the long march from Spain, and also from sickness arising from their passing the autumn in the south of Italy. Pompey during the summer had raised a large force in Greece, Egypt, and the East, the scene of his former glory. He had collected an army consisting of nine legions of Roman citizens, and an auxiliary force of cavalry and infantry; and his forces far surpassed in number those which Cæsar had assembled at Brundusium. Moreover, Pompey's fleet, under the command of Bibulus, Cæsar's colleague in his first Consulship, completely commanded the sea. Still Cæsar ventured to set sail from Brundusium on the 4th of January, and he arrived the next day in safety on the coast of Epirus. In consequence, however, of the small number of his ships, he was able to carry over only seven legions, which, from the causes previously mentioned, had been so thinned as to amount only to 15,000 foot and 500 horse. After landing this force he sent back his ships to bring over the remainder; but part of the fleet was intercepted in its return by M. Bibulus, who kept up such a strict watch along the coast that the rest of Cæsar's army was obliged for the present to remain at Brundusium. Cæsar was thus in a critical position, in the midst of the enemy's country, and cut off from the rest of his army; but he knew that he could thoroughly rely on his men, and therefore immediately commenced acting on the offensive. After gaining possession of Oricum and Apollonia, he hastened northward, in hopes of surprising Dyrrhachium, where all Pompey's stores were deposited; but Pompey, by rapid marches, reached this town before him, and both armies then encamped opposite to each other, Pompey on the right, and Cæsar on the left bank of the River Apsus. Cæsar was now greatly in want of re-enforcements, and such was his impatience that he attempted to sail across the Adriatic in a small boat. The waves ran so high that the sailors wanted to turn back, till Cæsar discovered himself, telling them that they earned Cæsar and his fortunes. They then toiled on, but the storm at length compelled them to return, and with difficulty they reached again the coast of Greece. Shortly afterward M. Antonius succeeded in bringing over the remainder of the army. Pompey meantime had retired to some high ground near Dyrrhachium, and, as he would not venture a battle with Cæsar's veterans, Cæsar began to blockade him in his position, and to draw lines of circumvallation of an extraordinary extent. They were nearly completed when Pompey forced a passage through them, and drove back Cæsar's legions with considerable loss. Cæsar thus found himself compelled to retreat from his present position, and accordingly commenced his march for Thessaly. Pompey's policy of avoiding a general engagement with Cæsar's veterans till he could place more reliance upon his own troops was undoubtedly a wise one, and had been hitherto crowned with success; but he was prevented from carrying out the prudent plan which he had formed for conducting the campaign. His camp was filled with a multitude of Roman nobles, unacquainted with war, and anxious to return to their estates in Italy and to the luxuries of the capital. His unwillingness to fight was set down to love of power and anxiety to keep the Senate in subjection. Stung with the reproaches with which he was assailed, and elated in some degree by his victory at Dyrrhachium, he resolved to bring the contest to an issue. Accordingly, he offered battle to Cæsar in the plain of Pharsalus, or Pharsalia, in Thessaly. The numbers on either side were very unequal: Pompey had 45,000 foot-soldiers and 7000 horse, Cæsar 22,000 foot-soldiers and 1000 horse. The battle, which was fought on the 9th of August, B.C. 48, according to the old calendar,[70] ended in the total defeat of Pompey's army.

The battle of Pharsalia decided the fate of Pompey and the Republic. Pompey was at once driven to despair. He made no attempt to rally his forces, though he might still have collected a considerable army; but, regarding every thing as lost, he hurried to the sea-coast with a few friends. He embarked on board a merchant-ship at the mouth of the River Peneus, and first sailed to Lesbos, where he took on board his wife Cornelia, and from thence made for Cyprus. He now determined to seek refuge in Egypt, as he had been the means of restoring to his kingdom Ptolemy Auletes, the father of the young Egyptian monarch. On his death in B.C. 51 Ptolemy Auletes had left directions that his son should reign jointly with his elder sister Cleopatra. But their joint reign did not last long, for Ptolemy, or, rather, Pothinus and Achillas, his chief advisers, expelled his sister from the throne. Cleopatra collected a force in Syria, with which she invaded Egypt. The generals of Ptolemy were encamped opposite her, near Alexandria, when Pompey arrived off the coast and craved the protection of the young king. This request threw Pothinus and Achillas into great difficulty, for there were many of Pompey's old soldiers in the Egyptian army, and they feared he would become master of Egypt. They therefore determined to put him to death. Accordingly, they sent out a small boat, took Pompey on board with three or four attendants, and rowed for the shore. His wife and friends watched him from the ship, anxious to see in what manner he would be received by the king, who was standing on the edge of the sea with his troops. Just as the boat reached the shore, and Pompey was in the act of rising from his seat in order to step on land, he was stabbed in the back by Septimius, who had formerly been one of his centurions. Achillas and the rest then drew their swords; whereupon Pompey, without uttering a word, covered his face with his toga, and calmly submitted to his fate. He had just completed his 58th year. His head was cut off, and his body, which was cast naked upon the shore, was buried by his freedman Philippus, who had accompanied him from the ship. The head was brought to Cæsar when he arrived in Egypt soon afterward, but he turned away from the sight, shed tears at the untimely end of his rival, and put his murderers to death.

When news of the battle of Pharsalia reached Rome, various laws were passed which conferred supreme power upon Cæsar. Though absent, he was nominated Dictator a second time, and for a whole year. He appointed M. Antonius his master of the Horse; and entered upon the office in September of this year (B.C. 48). He was also nominated to the Consulship for the next five years, though he did not avail himself of this privilege; and he was invested with the tribunicial power for life.

Cæsar went to Egypt in pursuit of Pompey, and upon his arrival there he became involved in a war, which detained him several months, and gave the remains of the Pompeian party time to rally and to make fresh preparations for continuing the struggle. The war in Egypt, usually called the Alexandrine War, arose from Cæsar's resolving to settle the disputes respecting the succession to the kingdom. He determined that Cleopatra, whose fascinations completely won his heart, and her brother Ptolemy, should reign in common, according to the provisions of their father's will; but as this decision was opposed by the guardians of the young king, a war broke out between them and Cæsar, in which he was for some time exposed to great danger on account of the small number of his troops. But, having received re-enforcements, he finally prevailed, and placed Cleopatra and her younger brother on the throne, the elder having perished in the course of the contest. Cleopatra afterward joined Cæsar at Rome, and bore him a son named Cæsarion.

After bringing the Alexandrine War to a close, toward the end of March, B.C. 47, Cæsar marched through Syria into Pontus in order to attack Pharnaces, the son of the celebrated Mithridates, who had defeated Cn. Domitius Calvinus, one of Cæsar's lieutenants. This war, however, did not detain him long; for Pharnaces, venturing to come to an open battle with the Dictator, was utterly defeated on the 2d of August near Zela. It was in reference to this victory that Cæsar sent the celebrated laconic dispatch to the Senate, Veni, vidi, vici, "I came, I saw, I conquered." He then proceeded to Rome, caused himself to be appointed Dictator for another year, and nominated M. Æmilius Lepidus his Master of the Horse. At the same time he quelled a formidable mutiny of his troops which had broken out in Campania.

Cæsar did not remain in Rome more than two or three months. With his usual activity and energy he set out to Africa before the end of the year (B.C. 47), in order to carry on the war against Scipio and Cato, who had collected a large army in that country. Their forces were far greater than those which Cæsar could bring against them; but he had too much reliance on his own genius to be alarmed by mere disparity of numbers. At first he was in considerable difficulties; but, having been joined by some of his other legions, he was able to prosecute the campaign with more vigor, and finally brought it to a close by the battle of Thapsus, on the 6th of April, B.C. 46, in which the Pompeian army was completely defeated. All Africa now submitted to Cæsar with the exception of Utica, which Cato commanded. The inhabitants saw that resistance was hopeless; and Cato, who was a sincere Republican, resolved to die rather than submit to Cæsar's despotism. After spending the greater part of the night in perusing Plato's Phædo, a dialogue on the immortality of the soul, he stabbed himself. His friends, hearing him fall, ran up, found him bathed in blood, and, while he was fainting, dressed his wounds. When, however, he recovered feeling, he tore off the bandages, and so died.

Cæsar returned to Rome by the end of July. He was now undisputed master of the Roman world. Great apprehensions were entertained by his enemies lest, notwithstanding his former clemency, he should imitate Marius and Sulla, and proscribe all his opponents. But these fears were perfectly groundless. A love of cruelty was no part of Cæsar's nature; and, with a magnanimity which victors rarely show, and least of all those in civil wars, he freely forgave all who had borne arms against him, and declared that he should make no difference between Pompeians and Cæsarians. His object was now to allay animosities, and to secure the lives and property of all the citizens of his empire. As soon as the news of his African victory reached Rome a public thanksgiving of forty days was decreed in his honor; the Dictatorship was bestowed upon him for ten years; and the Censorship, under the new title of "Præfectus Morum," for three years. Cæsar had never yet enjoyed a triumph; and, as he had now no farther enemies to meet, he availed himself of the opportunity of celebrating his victories in Gaul, Egypt, Pontus, and Africa, by four magnificent triumphs. None of these, however, were in honor of his successes in the civil war; and consequently his African triumph was to commemorate his victory over Juba, and not over Scipio and Cato. These triumphs were followed by largesses of corn and money to the people and the soldiers, by public banquets, and all sorts of entertainments.

Cæsar now proceeded to correct the various evils which had crept into the state, and to obtain the enactment of several laws suitable to the altered condition of the commonwealth. He attempted, by severe sumptuary laws, to restrain the extravagance which pervaded all classes of society. But the most important of his changes this year (B.C. 40) was the reformation of the Calendar, which was a real benefit to his country and the civilized world, and which he accomplished in his character as Pontifex Maximus. The regulation of the Roman calendar had always been intrusted to the College of Pontiffs, who had been accustomed to lengthen or shorten the year at their pleasure for political purposes; and the confusion had at length become so great that the Roman year was three months behind the real time. To remedy this serious evil, Cæsar added 90 days to the current year, and thus made it consist of 445 days; and he guarded against a repetition of similar errors for the future by adapting the year to the sun's course.

In the midst of these labors Cæsar was interrupted by intelligence of a formidable insurrection which had broken out in Spain, where the remains of the Pompeian party had again collected a large army under the command of Pompey's sons, Cneius and Sextus. Cæsar set out for Spain at the end of B.C. 46. With his usual activity he arrived at Obulco, near Corduba, in 27 days from the time of his leaving Rome. He found the enemy able to offer stronger opposition than he had anticipated; but he brought the war to a close by the battle of Munda, on the 17th of March, B.C. 46, in which he entirely defeated the enemy. It was, however, a hard-fought battle: Cæsar's troops were at first driven back, and were only rallied by their general's exposing his own person, like a common soldier, in the front line of the battle. Cn. Pompeius was killed shortly afterward, but Sextus made good his escape. The settlement of the affairs in Spain detained Cæsar in the province some months longer, and he consequently did not reach Rome till September. At the beginning of October he entered the city in triumph on account of his victories in Spain, although the victory had been gained over Roman citizens. The Senate received him with the most servile flattery. They had in his absence voted a public thanksgiving of fifty days, and they now vied with each other in paying him every kind of adulation and homage. He was to wear, on all public occasions, the triumphal robe; he was to receive the title of "Father of his Country;" statues of him were to be placed in all the temples; his portrait was to be struck on coins; the month of Quintilis was to receive the name of Julius in his honor, and he was to be raised to a rank among the gods. But there were still more important decrees than these, which were intended to legalize his power, and confer upon him the whole government of the Roman world. He received the title of Imperator for life; he was nominated Consul for the next ten years, and both Dictator and Præfectus Morum for life; his person was declared sacred; a guard of Senators and Knights was appointed to protect him, and the whole Senate took an oath to watch over his safety.

If we now look at the way in which Cæsar exerted his sovereign power, it can not be denied that he used it in the main for the good of his country. He still pursued his former merciful course: no proscriptions or executions took place; and he began to revolve vast schemes for the benefit of the Roman world. At the same time he was obliged to reward his followers, and for that reason he greatly increased the number of senators and magistrates, so that there were 16 Prætors, 40 Quæstors, and 6 Ædiles, and new members were added to the priestly colleges. Among other plans of internal improvement, he proposed to frame a digest of all the Roman laws, to establish public libraries, to drain the Pomptine marshes, to enlarge the harbor of Ostia and to dig a canal through the isthmus of Corinth. To protect the boundaries of the Roman Empire, he meditated expeditions against the Parthians and the barbarous tribes on the Danube, and had already begun to make preparations for his departure to the East. In the midst of these vast projects he entered upon the last year of his life, B.C. 44, and his fifth Consulship and Dictatorship. He had made M. Antonius his colleague in the Consulship, and M. Lepidus the Master of the Horse. He had for some time past resolved to preserve the supreme power in his family; and, as he had no legitimate children, he had fixed upon his great-nephew Octavius (afterward the Emperor Augustus) as his successor. Possessing royal power, he now wished to obtain the title of king, and accordingly prevailed upon his colleague Antonius to offer him the diadem in public on the festival of the Lupercalia (the 15th of February). But the very name of king had long been hateful at Rome; and the people displayed such an evident dislike to the proposal that it was dropped for the present.