In 1796, Thomas Jefferson wrote a letter to James Madison, in part questioning whether Congress’s enumerated constitutional authority to “establish Post Offices and post Roads” empowered the legislature to “make the roads, or only select from those already made, those on which there shall be a post” (emphasis in original). Weighing the constitutionality, efficiency, and economic wisdom of the two options, Jefferson chose the latter, preferring to keep Congress out of the business of “cutting down mountains & bridging . . . rivers.” Madison, however, would apparently struggle with the question of the federal government’s authority to build roads, culminating in one of the most dramatic (and inspiring) final acts in presidential history.

Almost twenty years after receiving Jefferson’s letter, President Madison had his eye on “internal improvements,” or infrastructure. In the aftermath of the War of 1812 and in the last years of his presidency, Madison felt compelled to introduce a more efficient system of roads for trade, transport, and communication, and he believed the federal government was suited for the task.

In his 1815 State of the Union address, Madison highlighted “the great importance of establishing throughout our country the roads and canals which can best be executed under the national authority.” Madison touted the many advantages he perceived in such a system—economic, utilitarian, patriotic, and artistic—before reiterating that while states had their own local roads and quaint canals, the federal government was the best choice for “systematically completing so inestimable a work” on a national scale. But did Congress have the authority to establish such a system? Somehow, the father of the Constitution seemed unconcerned, as “any defect of constitutional authority which may be encountered can be supplied in a mode which the Constitution itself has providently pointed out.” In other words, if it’s illegal, we’ll make it legal.

In his final State of the Union address, Madison doubled down on his desires for a national infrastructure package, calling on Congress “to effectuate a comprehensive system of roads and canals.” As to the constitutionality of his plan, Madison again charged Congress to get the job done by hook or by crook, emphasizing “the expediency of exercising their existing powers, and, where necessary, of resorting to the prescribed mode of enlarging them.”

Inspired by Madison’s remarks, young Congressman John C. Calhoun introduced the Bonus Bill of 1817, a provision designed to earmark certain revenue for “a permanent fund for internal improvement” in order to “bind the Republic together with a perfect system of roads and canals.” Such a bill seemed a perfect fit for what the president had requested only a few weeks earlier, and Speaker of the House Henry Clay joined Calhoun to push the legislation forward in the waning days of Madison’s term. Amid concerns of federalism, Congress even shored up the Bonus Bill with two amendments designed to place more power in the hands of the states than previously intended. The bill passed by the narrowest of margins in the House and fared only slightly better in the Senate, but it landed on James Madison’s desk in the final week of his administration, seemingly in the nick of time.

When Representative Calhoun and other Republican congressmen visited President Madison on his penultimate day in office to say goodbye, however, Madison privately told Calhoun that he had had a change of heart and would be vetoing the Bonus Bill. A dumbstruck Calhoun informed Speaker Clay, who wrote Madison and begged him to at least leave the bill for his successor, James Monroe. But Madison would not.

In his veto message to the House of Representatives, penned on his final day in office as his last official act as president, James Madison returned to familiar form:

“The legislative powers vested in Congress are specified and enumerated in the eighth section of the first article of the Constitution, and it does not appear that the power proposed to be exercised by the bill is among the enumerated powers, or that it falls by any just interpretation within the power to make laws necessary and proper for carrying into execution those or other powers vested by the Constitution in the Government of the United States.”

Vetoing the exact measures he had called for, Madison explained that he could not find “a power to construct roads and canals, and to improve the navigation of water courses” in the Commerce Clause, and he especially rejected appeals to the Preamble’s mission “to provide for the common defense and general welfare” as justification for such congressional power, as this interpretation would give Congress “a general power of legislation” and render “the special and careful enumeration of powers” in the Constitution “nugatory and improper.”

As he concluded, Madison echoed the policy views he had expressed in his 1815 pronouncement by first noting that he was “not unaware of the great importance of roads and canals and the improved navigation of water courses.”  But Madison was able to separate that enduring political view from his legal view that “such a power is not expressly given by the Constitution, and . . . no adequate landmarks would be left by the constructive extension of the powers of Congress as proposed in the bill,” so he had “no option but to withhold [his] signature from it.”

In his final act as President of the United States, James Madison reminded Americans of the importance of good-faith constitutional interpretation, federalism, and respecting the limits of enumerated powers, even at the expense of one’s own political preferences. Even more rare, Madison demonstrated how to leave office the same man he was when he entered. One can only hope that more public servants will follow his example.