From 1850, Stuart served as United States Secretary of the Interior under new President Millard Fillmore for three years. That Department had been founded on the suggestion of one of his fellow counsel in the Wheeling Bridge case, and neither of his predecessors had lasted long. The department which consolidated the General Land Office, the Office of Indian Affairs, and the U.S. Patent Office also worked to resolve the boundary with Mexico. Stuart didn't change the culture of political patronage, but at least gave rules and standards to the political appointments and removed some of the administrative chaos until resigning as President Fillmore's term ended in 1853.