Five years after graduation he had worked up to a first lieutenancy, and two years more found him a captain. In 1835 he was appointed on a commission to fix the boundary line between Michigan and Ohio. A few months later he was detailed to make an important study of the Mississippi River and Valley with a view to determining how to prevent the annual overflows with their consequent damage to property. His researches were chiefly along the upper river at Illinois. It is said that while there he was struck with the enormous potential energy of the current, and reported that if a dam were constructed at a certain place, a great storehouse of power would be possible. This was long before the day of the dynamo, by which such power could be harnessed. Many years later, however, his dream came true, at the place he had indicated,—the great power dam nearly a mile long blocking the "Father of Waters" for the first time in his tumultuous career, at Keokuk, Iowa.

Farther down stream, above St. Louis, he began a system of river improvements which aroused no little opposition among property owners. The dispute that arose was one of the first things which brought the name of Robert E. Lee to public attention. But despite the short-sighted protests of some citizens of St. Louis, Lee went quietly ahead and carried the work through to the permanent betterment of the city. "I was sent here to do certain work, and I shall do it," was his terse comment.

When he had completed his work on the Mississippi, he was sent to New York to complete the harbor defenses at Fort Hamilton—down at the gateway of the city. He had been made captain of engineers by this time, and was looked upon as one of the ablest men in his line of work, in the army.

It was not long before his mettle was to be tested in actual warfare. The trouble with Mexico which had been smouldering for several years at length burst into flame. After the first victories along the border under General Zach. Taylor, a campaign from the sea was undertaken, under General Winfield Scott, who landed at Vera Cruz. The purpose was to march overland to the capital, reducing the country as they went; and to make this possible the army engineers were in demand. They answered the call gladly, for the spirit of adventure ran high, and every army officer welcomed the chance to see active service.

In the corps of engineers we find several names destined to become famous—Lee, Beauregard, McClellan, Foster, Tower, Stevens, Totten, and others; while Grant was attached to the commissary of the same army. It was in effect a training school for the great drama of a few short years later.

Captain Lee was placed on the personal staff of General Scott, and given supervision of important road and bridge building. In a letter to his wife, dated Rio Grande, October 11, 1846, he writes: "We have met with no resistance yet. The Mexicans who were guarding the passage retired on our approach. There has been a great whetting of knives, grinding of swords, and sharpening of bayonets ever since we reached the river."

This was written while serving with General Wool in northern Mexico. He took part in the battle of Buena Vista, his first engagement, and was then summoned to Vera Cruz by Scott. That doughty old General and former commandant at West Point had all along shown a great partiality for Lee; and in the campaign which was to follow, we find him constantly writing of his young staff officer in glowing terms. One such incident is typical.

Lee had undertaken alone an all-night exploration of a desolate, lava tract called the Pedregal, which had been shunned by scouts and troopers alike. It was treacherous country, difficult to traverse, and possibly infested by the enemy. General Scott writes: "I had despatched several staff officers who had, within the space of two hours, returned and reported to me that each had found it impracticable to penetrate far into the Pedregal during the dark. . . . Captain Lee, having passed over the difficult ground by daylight, found it just possible to return to San Augustin in the dark, the greatest feat of physical and moral courage performed by any individual, in my knowledge, pending the campaign."

Another General, P. F. Smith, also bears tribute to this and other such feats: "I wish partially to record my admiration of the conduct of Captain Lee, of the Engineers. His reconnaissances, though pushed far beyond the bounds of prudence, were conducted with so much skill that their fruits were of the utmost value—the soundness of his judgment and personal daring being equally conspicuous."

At Vera Cruz Lee had the pleasure of meeting his older brother, from whom he had long been separated. This was Lieutenant Sydney Smith Lee, who had entered the Navy before Robert went to West Point. Now for the first time the brothers, sailor and soldier, fought side by side. But it was with mixed feelings that Robert Lee passed through this experience. He was brave enough on his own account, but he constantly trembled for Sydney! He had placed a battery in position to reduce the town, and thus describes the ensuing action: