 He saw his first combat during the Mexican–American War, where he received a brevet promotion to major for his actions at the Battle of Cerro Gordo.Allen was transferred to the Quartermaster's Department, and was eventually promoted to the chief quartermaster at Benicia, California, for the Department of the Pacific with the permanent rank of major.At the outbreak of the Civil War, Allen was reassigned to the Department of the Missouri, where he was again chief quartermaster, as well as a colonel.