William McKinley's public career opened and closed against the background of great national conflicts-the Civil War, which he joined as a private at the age of 18, and the Spanish-American War, which he ably prosecuted as commander-in-chief. During the Civil War, he rose to the rank of captain in the 23rd Ohio Volunteers, where he served with distinction under Rutherford B. Hayes, later 19th president. Hayes described McKinley as "a handsome, bright, gallant boy" and "one of the bravest and finest officers in the Army." On one occasion, as a commissary sergeant at the Battle of Antietam, he drove a wagon of hot rations through the thick of the fighting to his troops-a novel exploit that was widely praised. On another, as a captain and aide-de-camp at Kernstown in the Shenandoah Valley, he galloped under fire to give an independent regiment the word to fall back. He left military service and returned to Ohio with a brevet (or honorary) commission of major signed by Abraham Lincoln. He applied himself diligently to the law and politics with patient and irresistible success in the years that followed. He represented Ohio for many terms in the U.S. House of Representatives and was twice governor. In 1897 William McKinley became the 25th president of the United States of America.