Scott remained the Army's senior officer during the Mexican War. After the outbreak of hostilities in 1846, Congress temporarily authorized a second major general on the condition that he be immediately discharged upon the ratification of a peace treaty, and the Army's three brigadier generals were passed over in favor of Zachary Taylor, victor at Palo Alto and Resaca de la Palma. Two more major generals were authorized the following year on the same basis, Gideon J. Pillow and John A. Quitman. After the war, the extra major generals were duly discharged and Scott again became the Army's only major general. Scott was breveted lieutenant general in 1855 but continued to occupy the substantive grade of major general until he retired in 1861.