To clarify, Confederate forces under General Lee crossed into Maryland in September 1862 during the American Civil War. Lee aimed to divert Union forces away from the Confederate capital of Richmond, Virginia, and to potentially gain support for the Confederacy from the slaveholding state of Maryland. The Maryland Campaign culminated in the Battle of Antietam on September 17, 1862, which resulted in a tactical draw but a strategic victory for the Union as it halted the Confederate invasion of the North and prompted the end of slavery in Maryland.