In August, Lee fought the Second Battle of Bull Run (Second Manassas) and defeated John Pope's Army of Virginia. Pope was dismissed from command and his army merged with McClellan's. The Confederates then invaded Maryland, hoping to obtain European recognition and an end to the war. The two armies met at Antietam on September 17. This was the single bloodiest day in American history. The Union victory allowed Abraham Lincoln to issue the Emancipation Proclamation, which declared that all slaves in states still in rebellion as of January 1, 1863 were freed. This did not actually end slavery, but it served to give a meaningful cause to the war and prevented any possibility of European intervention.