The sectional problem, which had reached its full development in Congress by 1857, prevented any action in the interest of a Pacific railway so long as it should remain unchanged. As the bickerings widened into war, the railway still remained a practical impossibility. But after war had removed from Congress the representatives of the southern states the way was cleared for action. When Congress met in its war session of July, 1861, all agitation in favor of southern routes was silenced by disunion. It remained only to choose among the routes lying north of the thirty-fifth parallel, and to authorize the construction along one of them of the railway which all admitted to be possible of construction, and to which military need in preservation of the union had now added an imperative quality.

The summer session of 1861 revived the bills for a Pacific railway, and handed them over to the regular session of 1861–1862 as unfinished business. In the lobby at this later session was Theodore D. Judah, a young graduate of the Troy Polytechnic, who gave powerful aid to the final settlement of route and means. Judah had come east in the autumn in company with one of the newly elected California representatives. During the long sea voyage he had drilled into his companion, who happily was later appointed to the Pacific Railroad Committee, all of the elaborate knowledge of the railway problem which he had acquired in his advocacy of the railway on the Pacific Coast. California had begun the construction of local railways several years before the war broke out; a Pacific railway was her constant need and prayer. Her own corporations were planned with reference to the time when tracks from the East should cross her border and find her local creations waiting for connections with them.

When the advent of war promised an early maturity for the scheme, a few Californians organized the most significant of the California railways, the Central Pacific. On June 28, 1861, this company was incorporated, having for its leading spirits Judah, its chief engineer, and Collis Potter Huntington, Mark Hopkins, Charles Crocker, and Leland Stanford, soon to be governor of the state. Its founders were all men of moderate means, but they had the best of that foresight and initiative in which the frontier was rich. Diligently through the summer of 1861 Judah prospected for routes across the mountains into Utah territory, where the new silver fields around Carson indicated the probable course of a route. With his plans and profiles, he hurried on to Washington in the fall to aid in the quick settlement of the long-debated question.

Judah's interest in a special California road coincided well with the needs and desires of Congress. Already various bills were in the hands of the select committees of both houses. The southern interest was gone. The only remaining rivalries were among St. Louis, Chicago, and the new Minnesota; while the first of these was tainted by the doubtful loyalty of Missouri, and the last was embarrassed by the newness of its territory and its lack of population. The Sioux were yet in control of much of the country beyond St. Paul. Out of this rivalry Chicago and a central route could emerge triumphant.

The spring of 1862 witnessed a long debate over a Union Pacific railroad to meet the new military needs of the United States as well as to satisfy the old economic necessities. Why it was called "Union" is somewhat in doubt. Bancroft thinks its name was descriptive of the various local roads which were bound together in the single continental scheme. Davis, on the contrary, is inclined to believe that the name was in contrast to the "Disunion" route of the thirty-second parallel, since the route chosen was to run entirely through loyal territory. Whatever the reason, however, the Union Pacific Railroad Company was incorporated on the 1st of July, 1862.

Under the act of incorporation a continental railway was to be constructed by several companies. Within the limits of California, the Central Pacific of California, already organized and well managed, was to have the privilege. Between the boundary line of California and Nevada and the hundredth meridian, the new Union Pacific was to be the constructing company. On the hundredth meridian, at some point between the Republican River in Kansas and the Platte River in Nebraska, radiating lines were to advance to various eastern frontier points, somewhat after the fashion of Benton's bill of 1855. Thus the Leavenworth, Pawnee, and Western of Kansas was authorized to connect this point with the Missouri River, south of the mouth of the Kansas, with a branch to Atchison and St. Joseph in connection with the Hannibal and St. Joseph of Missouri. The Union Pacific itself was required to build two more connections; one to run from the hundredth meridian to some point on the west boundary of Iowa, to be fixed by the President of the United States, and another to Sioux City, Iowa, whenever a line from the east should reach that place.

The aid offered for the construction of these lines was more generous than any previously provided by Congress. In the first place, the roads were entitled to a right-of-way four hundred feet wide, with permission to take material for construction from adjacent parts of the public domain. Secondly, the roads were to receive ten sections of land for each mile of track on the familiar alternate section principle. Finally, the United States was to lend to the roads bonds to the amount of $16,000 per mile, on the level, $32,000 in the foothills, and $48,000 in the mountains, to facilitate construction. If not completed and open by 1876, the whole line was to be forfeited to the United States. If completed, the loan of bonds was to be repaid out of subsequent earnings.

The Central Pacific of California was prompt in its acceptance of the terms of the act of July 1, 1862. It proceeded with its organization, broke ground at Sacramento on February 22, 1863, and had a few miles of track in operation before the next year closed. But the Union Pacific was slow. "While fighting to retain eleven refractory states," wrote one irritated critic of the act, "the nation permitted itself to be cozened out of territory sufficient to form twelve new republics." Yet great as were the offered grants, eastern capital was reluctant to put life into the new route across the plains. That it could ever pay, was seriously doubted. Chances for more certain and profitable investment in the East were frequent in the years of war-time prosperity. Although the railroad organized according to the terms of the law, subscribers to the stock of the Union Pacific were hard to find, and the road lay dormant for two more years until Congress revised its offer and increased its terms.

In the session of 1863–1864 the general subject was again approached. Writes Davis, "The opinion was almost universal that additional legislation was needed to make the Act of 1862 effective, but the point where the limit of aid to patriotic capitalists should be set was difficult to determine." It was, and remained, the belief of the opponents of the bill now passed that "lobbyists, male and female, ... shysters and adventurers" had much to do with the success of the measure. In its most essential parts, the new bill of 1864 increased the degree of government aid to the companies. The land grant was doubled from ten sections per mile of track to twenty, and the road was allowed to borrow of the general public, on first mortgage bonds, money to the amount of the United States loan, which was reduced by a self-denying ordinance to the status of a second mortgage. With these added inducements, the Union Pacific was finally begun.

The project at last under way in 1864–1865, as Davis graphically pictures it, "was thoroughly saturated and fairly dripping with the elements of adventure and romance." But he overstates his case when he goes on to remark that, "Before the building of the Pacific railway most of the wide expanse of territory west of the Missouri was terra incognita to the mass of Americans." For twenty years the railway had been under agitation; during the whole period population had crossed the great desert in increasing thousands; new states had banked up around its circumference, east, west, and south, while Kansas had been thrust into its middle; new camps had dotted its interior. The great West was by no means unknown, but with the construction of the railway the American frontier entered upon its final phase.