On 29 April 1861, Maryland’s legislature voted 53-13 against convening a secessionist convention. However, they also voted not to reopen rail links with the north, and requested that Lincoln remove federal troops from the state. Lincoln responded by giving the army limited authority to suspend habeas corpus. When the state militia demolished several railroad bridges, Militia Lieutenant John Merryman was arrested, charged with treason, and placed in custody.
Chief Supreme Court Justice Taney issued a ruling in Ex parte Merryman stating that the President could not authorize the suspension of habeas corpus, but Merryman remained in custody, with Lincoln explaining that he had been authorized because Congress had been out of session at the time, and an invasion or rebellion could have taken place.
When Congress returned, it failed to pass a bill to retroactively approve Lincoln’s habeas corpus suspensions. However, the administration continued with further arrests in Maryland regardless. The situation wasn’t resolved until the Habeas Corpus Suspension Act of 1863, which authorized the President to suspend habeas corpus in response to the Civil War.
The situation infuriated many Marylanders, notably including one John Wilkes Booth. Nevertheless, Maryland did not join the Confederacy, and more Marylanders joined the US army to fight for the Union cause than joined the Confederate forces.