This novel’s brilliant journey into the past begins in 1888, when the use of electricity was in its infancy and two great inventors, Thomas Edison and George Westinghouse, were fighting to control its spread across the United States and to reap the wealth and glory that would follow. In “The Last Days of Night,” Graham Moore digs deep into long-forgotten facts to give us an exciting, sometimes astonishing story of two geniuses locked in a brutal battle to change the world.

Moore — also the author of “The Sherlockian,” a fascinating novel about Sherlock Holmes and Sir Arthur Conan Doyle, and the Oscar-winning screenplay for “The Imitation Game” — tells this amazing story through the eyes of Paul Cravath, a 26-year-old lawyer who was hired by Westinghouse to lead his legal battle with Edison. He would later found the prominent New York law firm that still bears his name.

"The Last Days of Night" by Graham Moore (Random House)

The legal case, simply put, was that Edison had patented a lightbulb and that Westinghouse had invented a better one, but the U.S. patent office had ruled that Westinghouse’s bulb violated Edison’s patent. Edison was demanding $1 billion in damages. Cravath’s job was to persuade the courts that, despite the patent office ruling, his client’s bulb was different from Edison’s.

Another inventor enters the story, the Serbian-born, highly eccentric, often unstable Nikola Tesla. At that point, Edison could offer only direct current, or DC, power. Unfortunately, DC could be transmitted only short distances, and therefore only those with enough money to buy a generator for their homes could enjoy electricity.

Tesla found a way to use the higher-voltage alternating current, or AC, to overcome the distance limit and thus revolutionize the spread of electricity. He went to work for Westinghouse to perfect his invention. Cravath, fearing that Edison might have Tesla killed — his laboratory did mysteriously burn down — kept him in hiding for months. Edison, he knew, was not a man to cross.

Edison set out to persuade the country that his rival’s AC current was so dangerous that it would “murder your children.” He sent a man up and down the East Coast to hold public exhibitions at which DC and then AC power were sent through the bodies of dogs. The DC power caused the dogs to yelp in pain; the stronger AC voltage inflicted horrid deaths upon them. Proof, Edison’s man declared, of the fate that might befall America’s children if Westinghouse had his way.

Edison did not stop with dogs. He used his political influence to convince the New York legislature that electrocution — using the AC current — should replace hanging in carrying out the death penalty. Soon enough, a condemned man was gagged and strapped into the first electric chair. The horror that followed, although factual, is almost beyond belief.

The novel abounds with fascinating real-life characters. Cravath’s grandfather helped found Ohio’s Oberlin College to foster coeducation. Cravath’s father, a clergyman, co-founded Fisk University in Nashville after the Civil War to provide education for freed slaves.

Cravath himself engages in a cautious romance with the beautiful, formidable Agnes Huntington, who sang with the Metropolitan Opera. This romance really happened, although Moore admits embellishments.

Other prominent men figure in the novel. The financier J.P. Morgan finally wields his money like a bludgeon to force a settlement of the long war between Edison and Westinghouse. He, too, was not a man to cross. A detailed author’s note makes clear what is historical fact in the novel — most of the story — and what is fiction.

The author Graham Moore (Matt Sayles)

Ultimately, Moore’s novel addresses more than the epic battle between two great inventors. He’s fascinated by the nature of genius and its remarkable flowering near the end of the 19th century. In many ways, the inventor he most admires is the often bewildering Tesla, who cared not a whit for fame and fortune. He lived for ideas, solutions to problems, and was content to have lesser men implement them. When his work went well, Tesla would gladly live in furnished rooms and subsist on saltine crackers. Although, if Cravath was buying, he did sometimes enjoy lobster and good wine at Delmonico’s.

As the story ends, Cravath looks back on the birth of electricity — the world-changing “end of night” — and concludes that “in order to produce such a wonder the world required men like each of them. Visionaries like Tesla. Craftsmen like Westinghouse. Salesmen like Edison.” He mentions other innovators then emerging, including Henry Ford and the Wright brothers. For good or ill, human inventiveness is inexhaustible.

Moore’s book demonstrates this point well, and his intellectual curiosity, graceful prose and tireless research have made “The Last Days of Night” a model of superior historical fiction.

Patrick Anderson regularly reviews mysteries and thrillers for The Washington Post.

the last days of night

By Graham Moore

Random House. 357 pp. $28