Serving in the Mexican War, Grant was commissioned as a colonel at the start of Civil War. He earned a reputation with his campaigns in the Mississippi River Valley, especially with the capture of Vicksburg, Mississippi. In March 1864, Lincoln promoted Grant to Lieutenant General, and put him in command of all Union armies. He established his headquarters with the Army of the Potomac. Under Grant's command, the war ended soon after the surrender of Lee's Army of Northern Virginia to Grant at Appomattox Court House, Va., in April 1865.