In 1945, streetcars plied the District’s streets. A new book recounts their history. (Marion Collins/The Washington Post)

The fire at the corner of Pennsylvania Avenue and 14th Street NW was so huge that observers likened its towering flames to the roiling lava of an erupting volcano, our very own Krakatoa.

It was Sept. 27, 1897, and the city’s largest office building was ablaze.

This was bad news for the clerks who worked there, but it was bad news for Washington’s commuters, too. No lives were lost, but at about 11:20 p.m. streetcars all over the city ground to a halt. The reason: The building was the headquarters of the Capital Traction Company, and its lower floors housed the complicated machinery that pulled cable-driven cars on their routes. As debris fell from upper floors, the machines were destroyed.

“It’s almost fantastical to think about it, the engineering involved,” said John DeFerrari, who recounts the story in his new book, “Capital Streetcars: Early Mass Transit in Washington, D.C.

To run the cable-car system, miles of heavy wire cable were snaked under the city’s streets. They were spooled around massive wheels turned by coal-powered steam engines. To roll down the rails, a streetcar would grip the constantly moving cable.

“The cables would wear out,” John said. “To replace a cable at night in the powerhouse they’d have to cut the cable, splice in the new one and draw it through the whole system, while pulling out the old one.”

A single cable could be more than five miles long.

Cables were only one motive method tried during the District’s streetcar era, which lasted from 1862 to 1962 (so far). It started with horses, of course, and ended with electricity from underground and overhead wires. In between were systems including one that used compressed air and another that relied on a series of electrified metal panels laid on North Capitol Street.

“Streetcars were supposed to get power only as they passed over them,” John said. “That experiment ended very quickly. The trouble was they couldn’t keep the power off of the plates when streetcars were not on them.”

Animals and people who happened to step on a plate were in danger of being electrocuted.

“That was a very bad thing,” John said.

John’s day job is at the Government Accountability Office. I last wrote about him in 2013, when he published a book ab0ut the District’s restaurant history. The shelves of District streetcar buffs typically include two earlier books — Leroy O. King’s100 Years of Capital Traction” and Peter C. Kohler’sCapital Transit: Washington’s Street Cars, The Final Era 1933-1962.”

“My thought was there isn’t a book that just tells the story of Washingtonians and their interactions with streetcars in history,” John said. “That’s a great story. That’s the story I wanted to tell.”

Washington’s streetcars were a microcosm of the city, a great mixing bowl. And like the city today, Congress tried to meddle. Southern politicians did their best to legally segregate the cars, something that never happened. (Even so, it wasn’t until 1955 that the first African American streetcar operator was hired.)

What’s amazing reading the book is how many politicians actually took public transportation back then. Supreme Court justices, too. I don’t think that happens today.

Some of the old irritations would be familiar to modern commuters: rising fares, crowded conditions, inconsiderate riders. Today on Metro we have “manspreaders”: passengers (usually male) who take up two seats. The streetcar equivalent was the “end-seat hog,” a person who refused to scootch down along the bench seat, making it hard for people to get on or off.

It wasn’t conspiracy that killed the streetcar in D.C. but the rise of the bus and, later, the personal automobile. The last time a streetcar carried a paying passenger here was Jan. 28, 1962. Said John: “Almost as soon as [streetcars] were gone — even before, one could argue — people began to be nostalgic for them, even though so many people had resented the way they clogged traffic and seemed to be rickety and old-fashioned.”

The fire that consumed the Capital Traction building in 1897 forced the company’s directors to abandon cable power and switch to electrical conduit. But they faced a more pressing problem: how to move the thousands of commuters who depended on their streetcars.

“Even before the fire was put out, they were working to get horses from local stables to use to pull the cars along the tracks,” John said. “Apparently they got so many of them together overnight that there was virtually little or no delay in getting the cars moving.”

You hear that, WMATA?

Twitter: @johnkelly

For previous columns, visit washingtonpost.com/johnkelly.