When a new public library building opened in Washington in 1903, acclaim for its controversial benefactor piled higher than a stack of overdue books.

An assortment of grandees who included President Theodore Roosevelt, White House aides and leading members of the House and Senate descended on Mount Vernon Square on Jan. 7 to celebrate the opening — and heap praise on Andrew Carnegie, the steel baron whose money made it possible.

Similar — if smaller-scale — civic ceremonies unfolded across the United States during the late 19th and early 20th centuries as towns and cities erected public libraries with Carnegie money. In total, the Scotland-born steel tycoon donated more than $40 million for the construction of 1,679 public libraries across the United States, according to an article in the American Library Association Bulletin by historian George S. Bobinski.

More than a decade earlier, Carnegie’s reputation as an enlightened industrialist took a severe blow when a confrontation between management and labor at his Homestead, Pa., steel plant turned violent, leaving 10 workers and three armed strikebreaking Pinkerton guards dead.

But none of it mattered that day in Washington as speaker after speaker hailed Carnegie for his beneficence. One called him “Santa Carnegie.”

He had donated $350,000 — $10.2 million in current dollars —  toward construction of what became the first desegregated public building in the nation’s capital.

“This sort of gift,” Roosevelt said to applause, referring to the gleaming Beaux-Arts building, “is equally far from two prime vices of our civilization — hardness of heart and softness of head.”

Hailed by the Washington Times in 1902 as “an effective combination of the Greek and Roman renaissance,” combining “taste and dignity,” the building served as Washington’s main library until 1972, when the Martin Luther King Library opened on H Street in Northwest Washington.

In the years that followed, the Carnegie building has hosted a city history museum and was considered a potential home for the International Spy Museum. Today, the building heralded at its opening as a palace of literature is undergoing another transformation with plans for it to be shared by the D.C. Historical Society and an Apple store.

Carnegie was far from the only paternalistic plutocrat of the late 19th century. Railroad car magnate George Pullman built a company town for his employees south of Chicago in the early 1890s.

Thousands of workers lived in relative comfort until Pullman laid off thousands and cut pay by 25 percent for those still on the job while freezing rents after the Panic of 1893. Workers walked off the job in protest, leading to a violent nationwide railroad strike suppressed with the aid of federal troops. Pullman’s experiment in benevolence collapsed in the wake of the dispute.

Carnegie took a different approach — one that proved more durable than Pullman’s and made him unusual in the era of the robber barons.

“The problem of our age,” he argued in an 1889 article in the North American Review, “is the proper administration of wealth.” The wealthy should use their riches to improve public facilities that would enable the deserving poor to help themselves, Carnegie said, because this kind of philanthropy is “best calculated to do … lasting good.” Support for library construction became the most visible manifestation of his philosophy.

Carnegie’s support for libraries reflected a genuine belief in their educational and cultural importance that stemmed from his own experience as an immigrant youth in Pittsburgh, historian Wayne Wiegand said. The need was great.

Libraries were often afterthoughts, located in abandoned churches or empty storefronts. In Chatfield, Minn., Bobinski wrote, the library shared space with a public restroom whose matron doubled as the librarian.

The money came with strings. Wiegand said communities had to provide the land and commit to supporting the library in perpetuity with revenue equal to 10 percent of the grant. Carnegie’s $40 million went only to English-speaking nations — Bobinski notes that an additional $16 million was donated to build 830 libraries in other countries.

In the aftermath of the violence at Homestead, many came to see Carnegie as a threat to workers rather than an enlightened champion of their welfare. Carnegie and others, the Los Angeles Herald warned, “have aimed to betray, and succeeded in betraying, the American laborer. It has been the old and only too true story of the rich becoming richer and the poor poorer, year by year.”

Some communities refused to take Carnegie’s money.

“Justifications varied,” Wiegand wrote in “Part of Our Lives: a People’s History of the American Public Library.” Louisville, Ky., objected to building “a monument to beggary,” while many communities in the South feared that accepting Carnegie money would require them to open the buildings to African American patrons.

“Mostly, however, it was class” consciousness that drove opposition to Carnegie money, according to Wiegand. When Wheeling, W.Va., voters balked at accepting a Carnegie grant, Wiegand wrote, a union leader exulted that, “There will be one place on this great green earth where Andrew Carnegie can’t get a monument with his money.”

Many other towns and cities, however, held no such reservations. A snapshot illustrating the scope of the Carnegie library campaign appears in the March 1912 edition of the Library Association’s bulletin. In 1911, Carnegie library bequests included $7,000 to Union Springs, Ala.; $210,000 to Los Angeles for six library branches; $6,500 to Delta, Colo.; $20,000 to Valparaiso, Ind.; $25,000 to Coffeyville, Kan.; $10,000 to Detroit; $68,000 for four libraries in Mississippi, including $13,000 for the “colored branch” in Meridian; $12,500 to Ada, Okla.; and $55,000 to Roanoke, Va.

In small towns and medium-size cities across the country, the Carnegie-funded libraries became the “cultural center of the town,” Wiegand said. “That place called the public library helped construct small-town America.”

A little more than a year after the District’s Carnegie-funded library opened, Denison, Iowa, reveled in a display of civic pride with the opening of its new library.

Although local residents made significant contributions, Denison’s main benefactor was Carnegie, who provided $12,500 for the building. The building enabled the library, which had occupied the backroom of a bookstore and space in the Women’s Christian Temperance Union hall, to stand on its own.

“The library should become the literary center of Denison, a source of inspiration and profit to all,” according to the Denison Review. “In it every citizen can feel at home and at perfect liberty to enjoy its advantages.”

Today, Denison’s Norelius Community Library serves more than 7,800 card-carrying members with WiFi access, computer labs and meeting rooms in the original Carnegie portion of the building, library Director Monica Walley said. The building underwent an expansion and remodeling in the mid-1980s but retains characteristics of the original building.

“I think that this community embraces the Carnegie legacy,” Walley said. Denison residents “like this building as it is. It represents not only the history of the community, but it represents knowledge. We offer the rich and the poor the same thing.”

Read more Retropolis: