St. Louis in the 1800s. Henry Lewis/Public Domain

On March 10th, 1804—213 years ago today—the city of St. Louis went through a brief, well-organized identity crisis. The day before, it had been Spanish. In the morning, it was French. And as soon as noon hit, it was American, as it has remained for all the days since.

This multi-part switcheroo, which historians call “Three Flags Day,” was the symbolic and bureaucratic culmination of the Louisiana Purchase, in which France sold a massive swath of territory to the United States for pennies on the acre. The deal came as a surprise to the American government, which had only been trying to buy New Orleans. Instead, they got a piece of land that effectively doubled the size of the country and today makes up 15 U.S. states.

The deal was equally surprising to the Spanish, who had ceded the land in question to the French very, very recently—so recently, in fact, that they were still effectively running most of it. The sudden need to play catchup led to a strange 24 hours for St. Louisans.

Thure de Thulstrup’s “Hoisting of American Colors over Louisiana” depicts the ceremony in New Orleans—much less complex than St. Louis’s. Cabildo Museum/Public Domain

Three Flags Day was born from a problem of scale. Although the Louisiana Purchase technically went through on April 30, 1803, transferring hundreds of millions of acres of land is no small feat. It took months for the requisite arrangements to be made. Throughout the summer and fall of 1803, Congress signed papers, and money changed hands. That winter, there was an official Americanizing ceremony in New Orleans, which served as the territory’s capital.

But because it was winter in the 1800s, the many territory residents north of New Orleans didn’t get word of that switch until much later. So in March of 1804, it was decided that there should be another official ceremony, in St. Louis.

But there was a small problem: St. Louis was one of the cities the Spanish hadn’t gotten around to giving up. Authorities soon realized that, in order to actualize the territory’s new identity, “two treaties must be put into effect at one time,” writes historian Walter Barlow Stevens in St. Louis, The Fourth City. First, the land had to be be transferred from Spain to France. Then, it had to be be transferred again, from France to the United States.

One of the many signings of the Louisiana Treaty. This one occurred in New Orleans. US Capitol/Public Domain

Here’s how it happened. On March 8, 1804, the Spanish governor of St. Louis, Carlos de Hault de Lassus, posted a notice on the door of the city church notifying the public about the impending switch of nationalities. The next day, two American representatives—army commander Amos Stoddard and explorer Meriwether Lewis—boated across the Mississippi from Illinois and marched up to the governor’s mansion, with a band of soldiers in tow.

A small crowd gathered outside. Just before noon, Stoddard and de Lassus signed some papers and turned to the spectators. “By order of the king I am now about to surrender this post and its dependencies,” Delassus said. “The flag which has protected you during nearly 36 years will no longer be seen… From the bottom of my heart I wish you all prosperity.”

“Slowly the flag of Spain came down and slowly the flag of France went up,” writes Stevens. “The cannon boomed the salute. The excited habitants rushed up to the fort to get as near the flag as possible.” The original plan had been to keep the French flag up for six hours, but the citizens of St. Louis—many of whom remembered the city’s French roots—were so excited that the American contingent agreed to let it fly until the next day at noon. That night, people gathered in the church and sang French songs. “There was little sleep in old St. Louis during the hours the tricolor flew,” writes Stevens.

The Louisiana Territory, in white. National Atlas of the United States/Public Domain

At noon on March 10th, after a scant 24 hours of Frenchness, everyone assembled at the governor’s mansion once again. Although Stoddard was an American, it had been decided that he should play the role of France in the exchanges. (France’s go-to guy didn’t want to make the trip up.) He signed both lines of the relevant papers and addressed the crowd. On his signal, the French flag went down, and the American flag went up.

Someone called for three cheers, but after all this celebrating, people were tired. “The response was not hearty,” writes Stevens. But it’s this last identity that—at least so far—has stuck.