On June 22, 1944, barely two weeks into the Allied invasion of France, the future of those who would survive the assault—and of the 16 million other members of the U.S. armed forces—began to take shape in Washington, D.C. The Servicemen’s Readjustment Act, soon and forever to be known as the G.I. Bill, became law.

Few deeds of presidents or legislators would have as much impact on the lives of Americans. By subsidizing veterans’ mortgages, it accelerated a prosperity-building postwar housing boom; by sending millions to college, it fostered the birth of a vast middle class. The optimism and generosity embodied in the G.I. Bill were expressions of a belief that there was nothing a nation on the brink of victory in a bloody worldwide struggle could not accomplish. As the war neared its end in the spring of 1945, the No. 1 song in the country was Doris Day’s “My Dreams Are Getting Better All the Time.”

She was not the only one who thought it so. Nor was the G.I. Bill the only expression of the national self-confidence that bloomed during the late days of war and the early years of peace. The Marshall Plan created a new Europe rising from the ruins. The Federal-Aid Highway Act of 1944 heralded the ambitious notion of tying the nation together with a 40,000-mile network of roads. In Congress, politicians spoke not of the mass unemployment threatened by demobilization but of the potential for permanent, full employment. Many even believed the formation of the United Nations would guarantee a permanent peace.

Nowhere, though, did this national self-confidence demonstrate itself as boldly as it did in New York City in 1947, shortly after a rug importer named Eugene Le Bar arrived in town and triggered an audacious public-health campaign of unprecedented size and unexampled success. After traveling by bus from Mexico City, Le Bar checked into a Midtown hotel on Saturday, March 1. Soon, beset by pain, fever, and a peculiar rash, he was admitted to Willard Parker Hospital, the city’s infectious-disease facility. Two days later, he was dead.

It took until the morning of April 4 for health officials to determine the cause of death: smallpox. New York had recorded only nine instances of the disease in the previous 25 years, none at all in the previous 8. Few physicians in the city had ever seen smallpox, either on a microscope slide or in the appearance of its murderous excrescences on a doomed victim. Definitive diagnosis had had to wait until laboratory studies could be conducted in Washington.

Within hours of the confirming report, New York City health commissioner Israel Weinstein revealed the news in a press conference in his office. That afternoon and evening, the entire population of Willard Parker was vaccinated. Within days, health officials determined there had been no smallpox outbreaks in the nine cities, from Laredo to Pittsburgh, where Le Bar’s bus had stopped to discharge passengers. Tracking down the 3,000 guests who had stayed in the same hotel as Le Bar in the first weeks of March took slightly longer.

But it was the action taken on the public stage that reflected the buoyant postwar confidence that pulled the city through this terrifying moment. Marching under the slogan “Be sure, be safe, get vaccinated,” New York officials began a mass vaccination program unlike any other that the city—any city—had ever undertaken. In a thin, reedy voice that, by its very incongruity, seemed to underscore the seriousness of the situation, Commissioner Weinstein went on the air to declare a “grave emergency,” urging all New Yorkers to get vaccinated immediately.

At any other historical moment, in a city of nearly eight million, “all” and “immediately” would have framed an oxymoron. But in its intensity and length, the ensuing campaign was a domestic effort nearly as epic as D-Day itself, yet somehow executed with neither military authority nor civic compulsion. Vaccination was voluntary; the vaccine itself, soon available at more than 250 hospitals, clinics, police stations, and schools, was offered entirely free of charge. Some 3,000 volunteers supported and augmented the professional health workers. Demobilized civil-defense wardens conducted a massive citywide doorbell-ringing campaign and assisted the police with crowd control at overburdened dispensaries.

After the city depleted its own stock of vaccine, it turned to the army and navy, which gathered up 780,000 doses stored at military bases throughout the country. Mayor William O’Dwyer muscled pharmaceutical manufacturers into increasing production and lowering the price they expected the city to pay. On April 17 alone, fully 500,000 New Yorkers bared their arms for health workers. By the time the city shut down the clinics and declared victory, in early May, more than six million people had been rendered permanently safe from infection in just 28 days. Only 12 cases of smallpox had been recorded. “Civic-minded men and women,” said O’Dwyer, had displayed “the loyalty, unselfishness and patriotism of true citizenship.”

Naturally, not everyone had behaved admirably. A freelancing 29-year-old practical nurse, hoping to impress her boyfriend, injected several hundred people with what turned out to be water. In Westchester County, the health commissioner accused private physicians of profiteering—specifically, collecting inflated fees to administer vaccine that had been distributed to them free of charge.

But there were no recorded cries of government intrusion into private lives, or complaints of government competition with (or, in O’Dwyer’s case, bullying of ) private businesses. No one objected to the cost of the program. Anti-vaccination organizations—they existed back then, too—were silent. The genius of the plan that the mayor and his commissioners put into place was its entirely voluntary nature—a success driven by the sense of collective responsibility that had arisen on Pearl Harbor Day, peaked on V-E and V-J Days, and surged into the early postwar years as a righteous and powerful wave.

But waves break. Postwar prosperity induced for many of those who shared in it a complacency that abided inequality. As the decade neared its end, public-spiritedness had been strangled by deadening conformity. The Red Scare divided the country as much as the war effort had united it. The frosty dawn of the Cold War turned icy, and the atomic bomb cast the brightest visions of the national future into shadow.

Inevitably, it did not take long for our finest hours to be cheapened by Hollywood. In The Killer That Stalked New York, released in 1950, it was no surprise to see the unfortunate rug merchant transformed into a blonde diamond smuggler, portrayed by Evelyn Keyes in an extremely tight sweater. But it was a sign of the era’s close that the fellow feeling and sense of purpose that had made the great vaccination effort successful—the “true citizenship,” as Mayor O’Dwyer had called it—had devolved, in the film’s promotional copy, into something that could “bring terror to the hearts of eight million people.” The bold stream of civic responsibility that coursed through the streets of New York in 1947 had by decade’s end receded into a puddle of fear.