A little-known fact about Abraham Lincoln is that his administration created the Secret Service. Per The Washington Post, he signed the necessary legislation on the very day he was assassinated, though the agency’s initial purpose was to combat counterfeiters. But the Secret Service had a chance to defend Lincoln’s remains several years later, foiling an attempt at graverobbing that would see the late president moved within his own tomb for protection.

According to the Journal of the Abraham Lincoln Association, the Lincoln Tomb was opened to the public in 1874 to general approval. But the layout of the memorial gradually came to be regarded as insufficient for someone of Lincoln’s stature. It also didn’t adequately provide security for his body. Two years after the tomb’s opening, grave robbers in Chicago plotted to make off with Lincoln’s corpse and ransom it for $200,000. Luckily, the conspirators had an undercover Secret Service agent in their midst.

With Robert Lincoln’s approval, the plot was allowed to go through on November 7, an election day, so that the Secret Service could catch the robbers. They successfully brought them all in, and Lincoln’s body was temporarily hidden under building materials. When the hiding place became public knowledge, an honor guard was instituted. Lincoln’s body was moved around the tomb several times before Robert paid $700 for a secure reburial in 1901.