After graduating from the United States Military Academy at West Point, Longstreet served in the Mexican–American War. He was wounded in the thigh at the Battle of Chapultepec, and during recovery married his first wife, Louise Garland. Throughout the 1850s, he served on frontier duty in the American Southwest. In June 1861, Longstreet resigned his U.S. Army commission and joined the Confederate Army. He commanded Confederate troops during an early victory at Blackburn's Ford in July and played a minor role at the First Battle of Bull Run.