Ken Hechler, an urbane historian who carpetbagged his way into West Virginia’s gritty politics, where he battled destructive coal-industry practices, unsafe mining conditions and felonious county officials, died Dec. 10 at his home in Romney, W.Va. He was 102.

The cause was a stroke, his wife, Carol Kitzmiller, said.

During 18 years as a Democratic congressman, 16 more as West Virginia secretary of state and a final act as a do-gooder without portfolio, Dr. Hechler never tired of crusades.

“I used to be an agitator, then an activist,” he wrote at age 94, in 2009. “Now I am a hellraiser.” This was soon after he was arrested while protesting mountaintop removal, the mining method environmentalists hate most.

It seemed an unlikely destiny for the lanky highbrow who in 1957 came to Huntington, W.Va., to teach government at Marshall College. He had taught at Columbia and Princeton, edited President Franklin D. Roosevelt’s papers, written speeches in Harry Truman’s White House and for Adlai Stevenson’s 1956 presidential campaign, and authored scholarly works.

As coal trucks lumber past, Ken Hechler, 96, with friend Larry Gibson, shows a visitor a mountaintop that has been prepared to be leveled near Kayford, W.Va. (Katherine Frey/The Washington Post)

Given to professional swerves all his life, Dr. Hechler ran for Congress in the coal-rich, cash-poor 4th District after only one year in the state. Lacking name recognition, he wrote a jingle to the tune of “Sugartime,” with the chorus: “Hechler in the morning, Hechler in the evening, Hechler at election time.”

He was helped by the 1957 publication of “The Bridge at Remagen,” his acclaimed history of the Army’s momentous Rhine River crossing during World War II; just over a decade later, it would become a Hollywood movie starring George Segal. At factory gates and mine entrances, Hechler gave away thousands of copies of the book. Running as a liberal, he narrowly beat the incumbent Republican in 1958.

Charles Peters, active in West Virginia politics at the time and later the founding editor of Washington Monthly, recalled the circumstances that enabled Dr. Hechler’s early success.

“The state was liberal then. FDR was still a god to many people,” Peters said. “There was no EPA to threaten jobs, no Rush Limbaugh to appeal to voters’ worst instincts. Besides, folks liked Ken. They were proud of his book and admired his tireless campaigning.”

Dr. Hechler emphasized mine safety and workers’ rights from his first days in office, but the 1968 Farmington underground explosion, which killed 78 coal miners, caused an epiphany. “Nothing in my life,” he said later, “ever moved me as deeply.”

He became the principal author of the Federal Coal Mine Health and Safety Act, overcoming strong opposition to its passage in 1969. It made willful violation of safety rules a federal offense, put a ceiling on the amount of respirable coal dust permissible in a mine and compelled compensation for workers disabled by black lung disease.

Farmington also steeled his opposition to Tony Boyle, head of the United Mine Workers of America. Boyle was cozy with mine companies and a defender of Consolidation Coal, owner of the Farmington mine. Dr. Hechler openly campaigned for Joseph Yablonski, Boyle’s challenger for the union presidency.

Violence infested the contest. When thugs killed Yablonski, his wife and daughter in 1969 and menaced Dr. Hechler at rallies, the congressman came out for another reformer, Arnold Miller. Ultimately, Boyle went to prison for ordering the triple murder, and Miller became the union’s president.

Risk, political or physical, speckled Dr. Hechler’s career. He angered many constituents — nearly all of them white — when he joined the Rev. Martin Luther King Jr. during the final phase of the 1965 voting rights march from Selma, Ala., to Montgomery. He was the only member of Congress in King’s entourage.

Dr. Hechler later recalled that he was on a congressional junket to Cape Canaveral, Fla., when he heard about the brutal harassment of King and others by the Alabama authorities. He immediately left for Selma, he said, moved by stories about “the tear gas, cattle prods and hard times being given to civil rights supporters.”

A half-century later, he told an interviewer: “It was one of the proudest things I did in my checkered life.”

From PhD to Army service

Kenneth William Hechler was born in Roslyn, N.Y., on Sept. 20, 1914, to parents who were staunch Republicans. While attending Swarthmore College in Pennsylvania, Class of 1935, Ken Hechler became a passionate New Dealer, in large part because of the Depression.

He received a doctorate in political science from Columbia University in 1940 and met Samuel I. Rosenman, a Roosevelt adviser and justice on the New York Supreme Court, who enlisted Dr. Hechler to help annotate the president’s growing trove of public papers.

In 1942 he joined the Army, training at Fort Knox as a tank officer. He wrote the class’s satirical show. Its coda, “Praise the Lord and Pass Me My Commission,” caught his commander’s attention. He looked into then-Lt. Hechler’s background and recommended that the Army give him a more cerebral assignment.

Eventually he became a combat historian in Europe, gathering material on the ground and interviewing generals and sergeants. He came home in 1946 as a major with the Bronze Star and material for three books — on the Remagen attack; a biography of the Remagen commander, “Hero of the Rhine: The Karl Timmermann Story”; and an account of one battalion’s role at the Battle of the Bulge, “Holding the Line.”

In the late 1940s, Dr. Hechler resumed teaching, now at Princeton, but soon enlisted an aide to Truman to help him find a job in Washington. Dr. Hechler became a researcher for the White House and mostly wrote what he described as “minor whistle-stop speeches that were given at the smaller communities.”

The Democratic defeats in 1952 and 1956 meant no prospects in the executive branch for at least four years. His job as associate director of the American Political Science Association palled. So he transformed himself into a West Virginian and began a love affair with 4th District voters.

Though more liberal than they on some issues, his independence and close attention to constituent services won increasing support. By 1974, he ran for his ninth term unopposed.

Most legislators yearn for that situation. Dr. Hechler professed frustration. “I love campaigning and wanted to debate,” he reminisced later. “But no one would argue with me.”

Battle against strip mining

What he most wanted to argue about was strip mining. He was the first West Virginia official to demand total abolition and was increasingly angry when his proposals got nowhere on Capitol Hill. Twice, Congress passed bills intended to regulate the practice and ameliorate its effects. President Gerald R. Ford vetoed them. Dr. Hechler refused to vote to override the vetoes because he thought the bills were ineffective.

In 1976, he ran for the West Virginia gubernatorial nomination in a crowded field that included John D. Rockefeller IV, whose well-financed effort easily prevailed. Dr. Hechler launched a write-in campaign in a futile effort to keep his House seat.

In 1984, Dr. Hechler ran for secretary of state and promised on the hustings to clean up abuses in places like Mingo County, where, he said, “vote fraud is as old as the memory of man.” The secretary of state had no police authority but could initiate investigations.

In his first term, Dr. Hechler launched a probe of voting in one Mingo community. The effort had a domino effect as a state special prosecutor and the U.S. attorney’s office became involved.

By 1988, a platoon of county officials, along with a drug-dealing­ family that worked from a trailer adjacent to the courthouse, had been successfully prosecuted. Dr. Hechler, after winning his second term, said voters had just witnessed “the cleanest election in Mingo County history.”

Instead of seeking a fifth term as secretary of state in 2000, he ran unsuccessfully for a House seat. He then taught at what had become Marshall University and remained a piquant force within the environmentalist movement.

As a symbolic gesture, he entered the 2010 special election to fill the vacancy caused by U.S. Sen. Robert C. Byrd’s death, but he lost to Gov. Joe Manchin III (D). “I may be 97 years old,” Dr. Hechler said at the time, “but I still have a lot of fight left in me.”

A bachelor whose personal life had remained private, he was 98 when he married Kitzmiller, who reportedly had been his companion for years. Other survivors include a stepson, Joshua Kitzmiller of Romney.