On 24 August 1814, Rear Admiral George Cockburn and a force of more than 4000 British soldiers routed the Americans at the Battle of Bladensburg and marched on Washington, DC. They originally sent a major general in under a flag of truce, but after he and his party were attacked, the British said, ”well, the hell with this, then,” and set about burning the White House, the buildings housing the Senate and House of Representatives, the Library of Congress, and the Treasury building to the ground. Orders not to destroy private property were, fortunately, obeyed, so the city’s historic homes were spared. In a fit of pique, Cockburn also destroyed the offices of the National Intelligencer for writing mean things about him. His original plan to burn that was set aside after ladies who lived nearby pleaded with him to spare their homes. Instead, he had his men pull the place down brick-by-brick.
The original plan was to keep the fires going and make sure the buildings were well and truly razed, but rain from a hurricane put paid to that plan, so the shells of the White House and the Capitol survived. The same storm (which spun off a pair of tornadoes) also forced the British to withdraw to their ships, so in all Washington was only occupied for a little more than a day. It was long enough to make an impression, though. The American public and many people in Britain were shocked and dismayed by Cockburn’s actions, accusing him of outrageous and unnecessary vandalism. A few members of Parliament joined in the outcry. Most of the British people, however, believed the attack was justified, considering the damage the Americans had been doing to British towns and cities in Canada. They also noted that America started it anyway, since they were the ones who’d declared war in the first place.
The British eventually went home, and Washington was rebuilt, though there was some talk of moving it north of the Mason-Dixon line while they still had the chance. The obliterated Library of Congress was mostly replaced by Thomas Jefferson, who sold his personal library to the nation.
And that was the last time an enemy force occupied the American capitol.