After a march of one hundred and forty miles, lasting ten days, the Americans, on the 8th of January, came upon the enemy strongly posted on the heights of San Gabriel, with six hundred mounted men and four pieces of artillery, commanding the ford of the river. In a position where an officer with a soldier's training would perhaps have hesitated, Commodore Stockton's confidence and resolution influenced him to advance. He forded the river under the enemy's guns without firing a shot, dragged his guns through the water, and formed his men in squares on the opposite bank. Here he repelled an attack of the enemy, and after a stubborn conflict carried the heights by a charge. Next day, on the march across the plains of the Mesa, the Mexicans made another desperate effort to save the capital. They had a strong position, being concealed with their artillery in a ravine till the commodore came within gunshot; then they opened a brisk fire on his flank, at the same time charging him both in front and rear. The squares of blue-jackets coolly and steadily withstood the cavalry charge, and the enemy, after being twice repulsed, were finally driven off the field and dispersed. Immediately after the battle Commodore Stockton entered the city of Los Angeles, and for the second and last time California was conquered.

The object of the Government was now accomplished. When the time came to settle the conditions of peace, the territory of the United States was increased by this immense district, comprising over 650,000 square miles, and by far the largest part of the work had been done by Stockton and his naval brigade.

Soon after these events Commodore Shubrick came out in the "Independence" to take command of the station. He was followed by the "Lexington" with a detachment of troops belonging to the regular artillery. These were landed at the important points in California and left to garrison them, and the fleet could now turn its attention to the coast of Mexico, where vigorous demonstrations were soon after made. Mazatlan, the principal seaport of Mexico in the Pacific, was captured by a landing force of six hundred men from the fleet. Its garrison retreated, and the victorious Americans held the town until the end of the war, collecting duties at the custom-house, which went far to defray the cost of maintaining the squadron.

Other towns were taken, some of them several times over. At Guaymas and Mulejè attacks were made by the "Dale," under Commander Selfridge. After defeating the Mexican chief Pineda, whose band of guerillas infested the country about Mulejè, Captain Selfridge obtained a schooner, and stationed her there under Lieutenant Craven to blockade the port. At Guaymas a force was landed, and a severe fight took place with the Mexicans, in which Selfridge was wounded. Though the force of the "Dale" was too small to leave a garrison on shore, she remained off the town and made it untenable for the enemy.

At San José, at the extremity of Lower California, a post was established on shore in an old mission-house, which was garrisoned by fifty-seven men,—seamen, marines, and volunteers,—under Lieutenant Heywood. It was attacked in November, 1847, but the Mexicans failed in their attempt to carry the place by assault. The town had been deserted, and fifty or more women and children had taken refuge in the mission-house. In February the attack was renewed by a large force of Mexicans. Not wishing to risk an assault, they occupied the houses about the mission and laid siege to the post. Twice Lieutenant Heywood made a sortie with his gallant little force and drove them from their position; but they recovered their ground as soon as he returned. The situation was now becoming critical, for the supplies of the garrison began to fall short, and the fugitives under their protection shared their rations. At last they could not even get water; for with the close watch maintained by the enemy, any man who ventured out was shot down. The siege had lasted ten days, and the garrison would presently have been starved into surrender, when by a fortunate chance the "Cyane" came into the harbor. Commander Dupont, who was in command, immediately landed a force from his ship and raised the siege, bringing off the heroic garrison in safety. This was the last affair of importance on the west coast.

In the Gulf the outbreak of the war had found a large squadron already assembled. There were three fifty-gun frigates and half a dozen sloops and brigs. There were also two steamers, the first that the United States had used in war,—the large paddle-wheel vessel "Mississippi," and the "Princeton," which had gained a melancholy notoriety from the bursting of one of her guns while on an experimental trip in the Potomac, by which the Secretary of State, the Secretary of the Navy, and other high officers of the Government had lost their lives. The vessels, however, were all too large for the service. The Mexican coast is a long stretch of sand exposed to the sudden and tempestuous "northers," as they are called,—furious northerly gales which blow frequently in the Gulf. The important sea-coast towns lie mostly in deep bights or recesses at the mouths of rivers, sometimes two or three miles up, with a bar having but ten feet of water, and currents that render difficult the pilotage of sailing-vessels. Vera Cruz, a large town with strong fortifications, was an exception, for its harbor was deep and accessible. The other points of importance—Tuspan, Tampico, Alvarado, and Tabasco, the last of which lay some distance up the Tabasco River—were partially protected by earthworks, but their principal safeguard lay in the difficulties of a shallow and frequently shifting entrance.

The headquarters of the squadron were fixed at Anton Lizardo, a harbor formed by a group of small barren islands a few miles south of Vera Cruz. A blockade was declared and maintained by vessels stationed off the ports or cruising up and down the coast. In the course of the first summer the squadron was reinforced by four sloops and brigs; and, what was of much more importance, by two steam gunboats, the "Vixen" and "Spitfire," each of which carried an 8-inch gun and two lighter guns. These were the ideal vessels for service on the Mexican coast, with their heavy gun and their light draught,—only seven feet; and it is a curious fact that one of them, the "Vixen," was actually designed and under construction for the Mexican Government in New York when she was purchased by our own. Other steamers were added later, one of them a revenue cutter: and a number of gunboat schooners were also sent down to the station. The peculiar dangers and difficulties of the coast were seen in two catastrophes that befell the squadron during the summer. The brig "Truxtun," attempting to move against Tuspan, grounded on the bar in the river, where it was necessary to abandon her, and where the Mexicans left her after carrying off her guns; while another brig, the "Somers," was sunk with half her crew in a "norther" which came down on her without warning. Among the saved was her captain, Raphael Semmes, the future commander of the "Alabama."

The first eight months of the war on the east coast, while the squadron was under the command of Commodore Conner, were not marked by any great success. In August an attempt was made to capture Alvarado, thirty miles southeast of Vera Cruz. The large ships anchored off the bar, with the gunboats close in, engaging the batteries during the afternoon and evening, and a boat expedition was organized to attack in the morning; but when the morning came, the fleet was called off on account of threatening weather. In October the attempt was renewed, but with no better success. This time the gunboats were arranged in two divisions, each in tow of a steamer. After the first division had worked safely in, the towing steamer of the second grounded on the bar, and the schooners in tow got foul, and the van was left unsupported. This check was enough to decide the commodore against prosecuting the attack; the van was recalled, the grounded steamer got afloat, and the squadron sailed away a second time from Alvarado.

In November the fleet made an important capture,—the seaport of Tampico. Great preparations were made for the expedition, the force despatched consisting of the two principal frigates,—the steamers "Mississippi" and "Princeton,"—the sloop "St. Mary's," and a large fleet of gunboats. The gunboats, with the boats from the large ships, were safely towed over the bar and appeared before the city. The authorities thereupon surrendered without any resistance. The city was occupied, and a military government was established, which continued to the end of the war.