It was the practice of the Ommeyades with the advent of a new sovereign to change the hajib, or high chamberlain, whose duties and authority coincided with those of a prime minister, or chief dignitary of state. For this responsible employment, Al-Hakem selected Abd-al-Kerim, son of Abd-al-Walid, who had filled the position under his father. Eminent for bravery and learning, and versed in all the accomplishments of the age, Abd-al-Kerim had, from childhood, enjoyed the friendship and shared the amusements of his master. This choice was accepted as a happy augury of the future conduct of the new ruler, and contributed greatly to allay the fears of those who had questioned his intention and his ability to control the fiery passions of youth, which the possession of irresponsible power offered no inducements, save those enjoined by the precepts of morality, to restrain. His qualities as a politician and a general were destined to be soon put to the test in the suppression of an extensive insurrection, the prelude of an unquiet and sanguinary reign. His uncle, Suleyman, had long meditated, in the security of exile, designs against the crown, which he considered his birthright. His royal lineage, great wealth, and affable demeanor had gained for him a host of adherents among the adventurers and banditti who inhabited the city of Tangier and infested its environs. Their ambition was excited by magnificent promises, and their cupidity stimulated by the prospect of a contest whose prizes were the acquisition of untold wealth and the exercise of boundless license. The gold of Suleyman had corrupted many dissatisfied officials and a majority of the Berber chieftains. The moment so long awaited by the conspirators had now arrived. Abdallah, secretly leaving his estate at Toledo, joined his brother at Tangier. The details of an uprising were arranged, and every resource was employed to insure the success of the enterprise. Abdallah made a rapid journey from Tangier to Aix-la-Chapelle. The object of this embassy has never been disclosed, but from the result it is easy to conjecture its import. The aid of Charlemagne was solicited and obtained, and the co-operation of the walis of Barcelona and Huesca assured. The King of Aquitaine, with every mark of honor, escorted the Moslem prince to the base of the Pyrenees, and the latter in a few days was once more in the midst of the seditious populace of the ancient Visigothic capital. The measures of the rebel leaders were well taken. Simultaneously with the delivery of the citadel of Toledo to Abdallah, through the treasonable connivance of its governor, Suleyman landed at Valencia with a powerful army, and, founding his pretensions on the right of primogeniture, proclaimed himself. Emir of Spain. Al-Hakem, hearing of the revolt of Abdallah, had hastened to Toledo with the flower of the Andalusian cavalry and invested its walls. The lines had hardly been formed, however, when intelligence was received that Louis, King of Aquitaine, the son of the great emperor, had retaken Gerona, the key of the Pyrenees, and, aided by the defection of the walis of Lerida and Huesca, had already overrun a large part of the provinces of the Northwest. Charlemagne, eager to avenge the slaughter of Roncesvalles, as well as to extend the limits of his empire, had placed under the command of his son the picked troops of his army, veterans of a score of campaigns on the Danube and the Rhine. Recognizing the peril of the situation, and aware of the importance of preventing the union of this new enemy with those who were throwing his kingdom into confusion, Al-Hakem promptly abandoned the siege and advanced by forced marches to the valley of the Ebro. But the Franks had already retired. The details of their operations, scarcely mentioned in the annals of the time, throw no light upon their motives; but it is clear that the results of the expedition did not correspond with the magnificence and completeness of its preparations or with the hopes entertained of its success. An extreme caution, akin to timidity, seemed to take possession of the conquerors of the Saxons, the descendants of the heroes of Poitiers and Narbonne, as soon as the frowning barrier of the Pyrenees was left in their rear.

The presence of Al-Hakem revived the dormant enthusiasm of his subjects. Gerona, Huesca, Lerida, were recovered. Barcelona, whose perfidious governor, Zaid, after soliciting the protection of Charlemagne and paying homage to his son, had refused to admit the Franks into the city, now, with every demonstration of loyalty, threw open its gates at the appearance of his lawful sovereign.

The energy of Al-Hakem, seconded by the activity of his squadrons, in a short time reduced to obedience the entire territory which had been overrun by the Franks. Carried irresistibly on by his martial ardor he crossed the Pyrenees, and, by an unexpected stroke of good fortune, seized Narbonne, whose garrison he massacred and whose inhabitants he led into captivity. Elated by victory and laden with spoil, he left his trusty lieutenants, Abd-al-Kerim and Ibn-Suleyman, in charge of the frontier, and, with a force largely increased by the fame of his successes and the hope of rapine, once more directed his march towards Toledo. In the meantime, Suleyman had effected a junction with Abdallah on the banks of the Tagus. Indecision and a spirit of indolence seem to have prevailed in their councils, for, instead of making a diversion which might have still further embarrassed the movements of Al-Hakem and have perhaps changed the result of the conflict, they remained inactive, expecting the conclusion of the campaign with the Franks, until the approach of the Emir roused them from their lethargy. Fearful lest their hastily assembled and undisciplined levies of barbarians and malcontents might not be able to withstand the attack of the veterans of the regular army fighting under the eye of their sovereign, the insurgents left in Toledo as commander Obeidah-Ibn-Hamza, one of the most able officers in their service, who had surrendered the city and was continued in power as the reward of his infamy, and withdrew, after some desultory and indecisive engagements, into the province of Murcia. Here the veneration attaching to the name of Abd-alRahman, and the personal popularity of Abdallah, secured for the rebellious brothers a great accession of strength and a corresponding increase of confidence. Entrusting Amru, one of his officers, to prosecute the siege of Toledo, Al-Hakem pressed forward in quest of the rebels, and resolved, if possible, to bring the contest to a speedy termination. But again the courage of the insurgents failed them, and they sought the protection of the mountain fastnesses, where the Andalusian horsemen could not follow. For months the struggle was protracted, and the force of the Emir, impatient under inaction, began to be diminished by desertions. At length the rebels, whose supplies of provisions had been intercepted, ventured forth from their stronghold. In the plains of Murcia, not far from the field where Al-Hakem had won his first laurels in a victory over one of his present antagonists, a bloody battle was fought. The issue at first was doubtful, as the insurgents contested the ground with all the energy of desperation; but, at a decisive moment, the throat of Suleyman was pierced with an arrow, and, by his death, the spirit of his followers was broken. The slaughter that followed was long remembered as remarkable even amidst the butchery that disgraced the civil wars of Spain. The survivors were dispersed beyond all possibility of reorganization; and Abdallah, by an early withdrawal from the field, succeeded in reaching Valencia, where, disheartened and thoroughly penitent, he implored the forgiveness of his injured sovereign. With a magnanimity that did credit alike to his sagacity and his sentiments of affection, Al-Hakem accepted the submission of his uncle, but insisted upon his permanent retirement to Tangier and the surrender of his two sons, Esbah and Kasem, as hostages. The latter were treated with kindness and with the distinction due to their rank; a regular pension was assigned to them; and during the second year of their residence the younger was raised to an honorable employment, and the elder, having received the daughter of the Emir in marriage, was appointed governor of the important city of Merida.

While the operations of the war were languidly pursued in the South, the energy and resolution of Amru began to tell severely upon the besieged in Toledo. The inconstant populace, weary of perpetual alarms and threatened with famine, made their peace with the representative of the Emir by the surrender of the city and the sacrifice of their general. The treacherous Ibn-Hamza was promptly executed, and his head sent by a courier to Al-Hakem; the affairs of the city were regulated with all possible expedition; and Amru, leaving his son Yusuf in command of the garrison, departed with all his available battalions to reinforce the army of his sovereign, then at Chinchilla.

The serious disturbances which had for three years employed the resources and monopolized the attention of the Emir of Cordova presented to the hereditary and natural enemies of Islam an opportunity too favorable to be neglected. In 798 an alliance was concluded between Alfonso the Chaste and Charlemagne, but whether on equal terms or contingent on the vassalage of the Asturian king is uncertain. The Moslem governors of the frontier cities again renounced their allegiance to Al-Hakem, and, under an assurance of support and independence, rendered homage to Louis as their suzerain. The enterprising genius of Charlemagne, instructed by the costly lesson taught nearly a quarter of a century before in the pass of Roncesvalles, had abandoned, so far as the Peninsula was concerned, all ideas of permanent conquest and occupation. Experience had conclusively demonstrated that the contentions of factions, as well as the antipathies of race, became temporarily but effectually reconciled in the presence of a foreign enemy. But while his armies had not been able to obtain a foothold south of the Pyrenees, or even to traverse the defiles of that mountain chain in safety, no such difficulties seemed to attend the movements of the Moslems, whose flying squadrons plundered and ravaged without resistance the distant provinces of his empire. These important considerations, and the apprehension that some skilful Arab captain might recover and retain the fertile valleys of the South, the traditions of whose people recalled with pleasure the dominion of their ancient Mohammedan masters, impelled the Emperor to found and maintain a bulwark which would be available to harass the enemy as well as to break the force and retard the advance of an invading army. With this object in view a principality was founded on the Spanish side of the Pyrenees, which was given the name of the Gothic March, and its first lord, a Frankish noble named Borel, received his investiture from, and did homage to, the King of Aquitaine.

Insignificant at first, this embryo state speedily increased in power and consequence. The domain included within its boundaries had for years been the scene of bloody insurrections, of incessant anarchy, of partisan warfare. Its lands were untilled. Its inhabitants feared to venture beyond the walls of their cities. Its communications with the central government, always precarious, were often completely interrupted for months at a time. But as soon as comparative protection and safety were assured by the occupancy of the Franks a striking change became apparent in the condition of the country. The ruined fortifications were repaired. The habitual perfidy of the walis, tempted by the prospect of greater freedom, induced them once more to transfer their allegiance to the enemies of their faith. By the donation of extensive grants of territory, and the promise of unusual franchises and privileges, a host of colonists was attracted to the settlements of the new principality. The fields reclaimed from desolation again assumed the attractive prospect of cultivation and prosperity. The Gothic March became the refuge not only of such Christians as were discontented under Moslem rule, but of all those whose grievances led them to renounce allegiance to the King of the Asturias or to the chieftains of Biscay. Not a few were allured by the hope that here might arise a monarchy which, founded by the descendants of its ancient masters, would restore the laws, the prestige, and the glory of the Visigothic empire. Such was the origin of the state soon to be known as the County of Barcelona, a name of profound import in the subsequent history of the Peninsula. Its foundation was the second step towards the weakening of the Moslem power, and one scarcely inferior in political results to the establishment of the kingdom of the Asturias.

The chief towns of the new principality were Ausona, Cardona, Manresa, and Gerona. None of these were seaports, and the sagacity of Charlemagne perceived and appreciated the necessity of securing maritime communication with his dominions to obviate the possible isolation of the Gothic March, either through the inclemency of the seasons or the vigilance of his enemies. He therefore projected an expedition against Barcelona, which possessed an indifferent but available harbor, and whose commercial rank already afforded many indications of the importance to which it afterwards attained. Its situation and the intrigues of its walis had previously acquired for it a nominal independence. The present governor, Zaid, had constantly alternated between protestations of loyalty to Al-Hakem and solicitations of protection from Charlemagne. The King of Aquitaine having appeared before the walls with a numerous army, Zaid, with plausible excuses, protracted the negotiations looking to the delivery of the city until the approach of winter rendered a siege impracticable. Hassan, the wali of Huesca, also declined to admit the Franks, although he was the sworn vassal of Louis; and that disappointed prince, who had pictured to himself an easy and profitable termination of the campaign, was forced to retire with ignominy, amidst the murmurs of his dissatisfied soldiers, to the security of his own dominions.

The Grand Council of the empire, held according to the custom of the Franks every spring, met in the beginning of the year 801 at Toulouse. The object of these national assemblies was the discussion and settlement of future military operations, as determined by the arguments and the experience of the veteran warriors whose influence decided their deliberations. The abortive results of preceding enterprises had provoked the impatience rather than damped the ardor of the Frankish chieftains, and the unanimous voice of the Council tumultuously demanded the capture of Barcelona. Before the close of the year an immense army, which is designated by vainglorious chroniclers as composed of many distinct nations, emerged from the defiles of the Pyrenees. The vanity of Louis, which had suffered through the unprofitable issues of former campaigns, or possibly the entreaties of his lieutenants who knew his incapacity, induced him to remain at Rousillon until the event of the expedition could no longer be doubtful. The invading force was marshalled in two divisions,—one, under the Count of Gerona, pressed the siege of the city, and the other, commanded by William, Count of Toulouse, was stationed as a corps of observation between Lerida and Tarragona to prevent any attempt at relief by the Moslems of Cordova. The fortifications were fearlessly attacked and obstinately defended. Zaid, the wali of the city, abandoning the vacillating and treasonable conduct which had so long obscured his character, conducted the defence with an intrepidity and a resolution worthy of the greatest military heroes. Animated by his example, the garrison repulsed the storming parties, one after another, with great slaughter, although these were directed by the Frankish general in person. The losses sustained in these assaults impelled the besiegers to resort to the tedious but more certain measure of a blockade. The lines were drawn so tightly that the inhabitants soon began to experience the pressure of hunger. While the port does not seem to have been closed, still no supplies were sent to the suffering garrison by the government of Cordova. Many of the inhabitants perished; the remainder were reduced to contend with each other for the vilest and most revolting means to sustain their failing strength. They devoured the refuse of the streets. They fought desperately for fragments of the leathern curtains which hung before the doorways of their houses. Some in despair threw themselves from the walls. Others rushed headlong upon the weapons of the enemy. But despite the harrowing scenes of universal misery, there was no whisper of surrender. Even the Christians, who were numerous, took their turns upon the battlements and crossed swords with their co-religionists in the breach. No one believed that the Emir would abandon, without an attempt at relief, a city whose commercial advantages and geographical position rendered it one of the keys of his empire. At length a new army, commanded by King Louis himself, reinforced the besiegers. The distress of the garrison was increasing daily, and, his resources exhausted, Zaid determined to endeavor to reach Cordova and by a personal appeal to Al-Hakem obtain means to relieve the city. The intrepid governor, issuing unattended from a secret postern by night, had almost succeeded in penetrating the enemy’s lines when the neighing of his horse gave the alarm and he was captured. These depressing events exerted their influence on the besieged, but their constancy and courage still sustained them. At length, after several breaches had been made in the walls, and the Moslems, decimated in numbers, had been reduced to despair, negotiations were opened with the Franks. The most favorable terms obtainable involved the loss of property and the hardships of exile. The gates were finally thrown open, and a long and melancholy procession of unfortunates, tottering with weakness and emaciated by famine, upon whose faces were stamped the signs of protracted suffering, filed painfully through the camp of the enemy; and the Frankish chieftains, preceded by the ministers of the Christian faith arrayed in all the pomp and splendor of their order, entered the city, to celebrate before the altar of its principal temple the triumph by which the most important province of Eastern Spain had passed forever from beneath the Moslem sceptre.

The Christian population welcomed its change of masters with no manifestations of joy or enthusiasm. A gloomy silence pervaded the crowds lining the streets, as the prelates in gorgeous vestments and the men-at-arms in glittering steel swept by in majestic procession, to solemnize, with every circumstance of ecclesiastical ceremony and military ostentation, the fortunate termination of their enterprise. In the early ages of Islam the beneficent and tolerant rule of the Moor seems to have universally won the respect and inspired the confidence of conquered nations and hostile sectaries alike. For the happy conditions promoted by the exercise of the generous principles of equity and religious freedom, the ignorance, tyranny, and intolerance of a foreign hierarchy offered no adequate compensation. From the hamlets of Provence to the plains of Andalusia, the tributary Christians, save only such as were invested with the dignity of the sacerdotal order, appear to have always beheld, with unconcealed regret, the discomfiture and displacement of their infidel lords.

Well apprized of the uncertainty and difficulty of retaining his conquest, Louis repaired—as well as circumstances would permit—the walls of Barcelona, which had sustained considerable damage from the mines and military engines of his soldiery. A governor of Gothic race was left in command of a well-appointed garrison, and, his object finally attained, the King of Aquitaine retired from the scene of such devotion, self-sacrifice, and valor. The heroic Zaid, after receiving the reproaches and vituperation of his conqueror, who, actuated by some unknown motive, condescended to spare his life, was condemned to perpetual banishment, and henceforth disappears from history.