Correction: A previous version of this article incorrectly stated former senator Howard Baker’s date of birth. This version has been corrected.

Former senator Howard H. Baker Jr. of Tennessee, who framed the central question of the Watergate scandal when he asked, “What did the president know, and when did he know it?” and framed portraits of history with his ever-present camera while Senate majority leader and White House chief of staff, died June 26 at his home in Huntsville, Tenn. He was 88.

The cause was complications from a stroke, said longtime aide Tom Griscom.

Mr. Baker, who played a central role across two decades of Republican politics, wryly noted that photography “may be the only place where I can reasonably aspire to perfection.”

In the Senate, he served as a bridge between decades of bipartisan comity and the acrimony that has prevailed since the 1980s. At the White House, he was the ballast of sound ethics that helped steady Ronald Reagan’s foundering presidency after the Iran-contra scandal came to light.

The talent for compromise that propelled him to the leadership of the Senate was the undoing of his ultimate ambition — his own presidency — as his party shifted rightward and demanded strict adherence to conservative orthodoxy from its candidates for the White House.

His tenure as majority leader coincided with Reagan’s first term, from 1981 to 1985, and Reagan said the White House program of tax cuts — which Mr. Baker skeptically called “a riverboat gamble” — would not have been enacted without him.

He was, said former secretary of state James A. Baker III, to whom he was not related, “the quintessential mediator, negotiator and moderator.”

Mr. Baker, who served in the Senate from 1967 to 1985, was a politician as much by Republican pedigree and marriage as by election.

His father served as a member of the House of Representatives from Tennessee. His father-in-law was Everett McKinley Dirksen, an Illinois Republican and Senate minority leader.

Three years after his first wife, the former Joy Dirksen, died of cancer in 1993, Mr. Baker married Nancy Landon Kassebaum, who was about to retire from the Senate after three terms representing Kansas. Her father was Alfred M. Landon, the former governor of Kansas who, as the Republican presidential nominee in 1936, suffered one of the largest electoral defeats of all time.

Mr. Baker was the first popularly elected Republican senator from Tennessee, cultivating a moderate image despite an often conservative voting record. He shuffled about, rumpled and snapping away with his Leica whether in Senate committee meetings or the White House Cabinet Room.

When he was named vice chairman of the Senate Select Committee on Presidential Campaign Activities — the Senate Watergate committee formed to investigate the 1972 break-in at Democratic National Committee headquarters in the Watergate office building — Republicans were confident that the second-term southerner and trial lawyer with the boyish look and aw-shucks manner would defend the White House. His 1972 campaign literature described him as a “close friend and trusted advisor of our President, Richard M. Nixon.”

In 1999, former Sen. Howard Baker, R-Tenn., testifies before the Senate Governmental Affairs hearings on the reauthorization of the Independent counsel act. (Ray Lustig/The Washington Post)

Indeed, when he asked the question for which he became famous, Mr. Baker intended to distance Nixon from the scandal.

But what the president knew and when he knew it became the focus of the investigation of the seven-member panel during the summer of 1973 and of the Watergate special prosecutor and led to Nixon’s resignation a year later.

“The fact he acted as impartially as he did is one of the high points of his career,” said Rutgers University political scientist Ross Baker, who is not related to the former senator, speaking of the senator’s conduct on the panel.

Twenty-five years after Nixon’s resignation, Howard Baker said that during the televised hearings, he was so “tightly focused on trying to find out what really happened” that he was unable to understand the ultimate meaning of the break-in, the coverup, the investigation and the resignation.

“It was, indeed, a watershed time in American politics. And I guess I have to look back on it to realize how effective the system really was. . . . The system worked,” he said on the PBS show “The NewsHour With Jim Lehrer.”

The Reagan White House

As much as he played a key role in the unwinding of the Nixon presidency, Mr. Baker was a bulwark in the final years of the Reagan White House.

The president was reeling from the Iran-contra scandal, in which missiles were sold to Iran in violation of a congressional embargo and some of the proceeds were diverted to support the insurgent contras seeking to overthrow Nicaragua’s leftist government.

The president turned to Mr. Baker in February 1987. Retired two years from the Senate and making a handsome living as a private lawyer — $1.5 million a year with the Vinson & Elkins firm, by one account — he returned to government as White House chief of staff, recognizing that he was ending any chance to run for president in 1988.

Mr. Baker was on a family holiday in Florida when Reagan called. Joy Baker told the president that her husband and grandchildren were at the zoo, Griscom said.

“Do I have a zoo for him,” Reagan replied.

Before signing on, Mr. Baker found himself, again, asking: What did the president know, and when did he know it?

This time, he sought the answer in private with the president, satisfying himself that Reagan was innocent of any subterfuge in the affair.

The team Mr. Baker brought to the White House provided an immediate lift. They put together a penitential presidential speech, reassured the Senate that one of its own was at the president’s side and abandoned the promotion of CIA Deputy Director Robert M. Gates to be director of the agency because the nomination attracted further questions about Iran-contra.

The result: Reagan’s plunging approval rating began a steady climb throughout the remaining two years of his second term.

Accepting the job, Mr. Baker worried about moving from the Senate to a staff position. He told Kenneth M. Duberstein, who became Reagan’s deputy chief of staff and succeeded Mr. Baker during the president’s final year in office: “I’ve never managed anything before in my life. I’ve only been a U.S. senator.”

Six months into the job, he said in an interview with David Eisenhower, an author and a grandson of former president Dwight D. Eisenhower, that Reagan knew he was not getting a traditional nuts-and-bolts chief of staff when he replaced the previous staff chief, Donald T. Regan.

“The president knew me, knew what I looked like, knew that I had expertise on a wide range of issues and would give him the benefit of my opinions,” he said in the interview, published in the New York Times.

Mr. Baker became the public face of the White House staff, appearing on Sunday morning talk shows, for example, while Duberstein ran the West Wing operations.

Just days into the job, Mr. Baker discovered one of its unspoken challenges: dealing with the first lady. He considered quitting after an altercation with Nancy Reagan. She had sent word that she wanted a certain staffer fired but then blew up at Mr. Baker when he let others know the orders came from her and not the president.

“Tommy, I didn’t come here for that. She is the one who wanted him fired. . . . I’m not going to put up with that,” Griscom said Mr. Baker complained to him before being persuaded that his quitting would undercut the remaining two years of the president’s tenure.

Mr. Baker was fond of an expression he said he learned from his father: “You always leave yourself a backdoor, a side door or a trapdoor.” It meant, Griscom said, “you don’t talk in absolutes. You don’t want to get yourself boxed in where you can’t maneuver.”

Like Reagan, Mr. Baker enjoyed spinning a yarn — often, in his case, about East Tennessee courthouse politics. He once told Reagan: “You know, the real danger on this job for me is that I’m going to run out of stories before you do.”

Political family

Howard Henry Baker Jr. was born in Huntsville, Tenn., on Nov. 15, 1925, the grandson of a judge and the first female sheriff in Tennessee. His father represented Tennessee’s 2nd Congressional District from 1951 until his death in 1964, when Mr. Baker’s stepmother moved into the seat.

“The place is built around the Bakers,” a neighbor once said, equating it to “a feudal setting” in which the young Baker “was raised very much like the lord of the manor.”

Returning from the South Pacific, where he served in the Navy at the end of World War II, he enrolled at the University of Tennessee. He switched from earlier engineering studies to pursue a law degree because, he joked, the registration line for the law program was shorter than that for engineering.

He lost his first Senate race, in 1964. He succeeded two years later with help from Nixon, who was at that point out of office.

At various points during his Senate tenure, Mr. Baker was a member of the government operations, public works, commerce, foreign relations and rules committees.

Over his three terms, he supported key legislative efforts expanding environmental protection — particularly clean air and water — and civil rights, supporting an extension of the 1965 Voting Rights Act and fair-housing laws.

Before deciding whether to back the 1977 treaties that ceded the Panama Canal to Panama from U.S. control, Mr. Baker canvassed his staff on how his decision might affect his chance to win his party’s 1980 nomination for president. Jim Cannon, an aide who had been hired to work on a presidential run, told him that such a vote would mean the Republicans would never nominate him.

“So be it,” Mr. Baker replied. He eventually supported the successful effort to ratify the treaties, according to journalist Adam Clymer’s 2008 book “Drawing the Line at the Big Ditch: The Panama Canal Treaties and the Rise of the Right.”

Reflecting a conservative approach, Mr. Baker supported Reagan’s economic program of tax cuts and reduced spending for food stamps, child nutrition and child immunology. He also voted to reduce inspections by the Occupational Safety and Health Administration.

Notwithstanding his willingness to allow abortion in some instances, less-than-hearty endorsement of prayer in schools and his own description of himself as “moderate to moderate conservative,” his most important votes gave him a rating in the 1970s of 67 percent by the conservative Americans for Constitutional Action and 15 percent by the liberal Americans for Democratic Action, according to the biographical reference guide Current Biography.

Mr. Baker’s legislative leadership was marked by the period of divisiveness that grew out of Reagan’s 1980 landslide presidential victory, which also carried sharply partisan House members into the upper chamber.

“He was right on the ridgeline of a great divide,” leading a caucus that had included senators Jacob K. Javits of New York, a liberal, and Jesse A. Helms Jr. of North Carolina, a conservative, said Ross Baker of Rutgers.

“Being leader of the Senate,” Mr. Baker said in 1998, “was like herding cats. It is trying to make 99 independent souls act in concert under rules that encourage polite anarchy and embolden people who find majority rule a dubious proposition at best.”

The legislator received the Presidential Medal of Freedom, the government’s highest civilian award, in 1984 for his federal service. In his mid-70s, he returned to public life, serving as U.S. ambassador to Japan during President George W. Bush’s first term.

In addition to Kassebaum, of Huntsville, survivors include two children from his first marriage, Darek Baker of Brentwood, Tenn., and Cynthia “Cissy” Baker of McLean, Va.; two sisters; and four grandchildren.

Mr. Baker took great pride in his photography, a hobby he took up in the Boy Scouts.

From the rostrum of the Senate Watergate committee, on the campaign trail as a candidate in New Hampshire in 1980, in the Oval Office, lifting off from the White House South Lawn aboard Marine One, in the inner sanctums of the Vatican and in Red Square (where he snapped frames of Reagan and Soviet leader Mikhail S. Gorbachev), his camera became part of the scene as well as an instrument recording it from a unique and intimate perspective as he stepped outside his official role and became an observer.

Mr. Baker characterized the camera as “his way of writing and capturing the moments in life that are important to him,” Griscom said. “His diary, rather than in words, is in pictures. He was a part-time politician but a full-time photographer.”

Gerstenzang covered Washington politics for the Los Angeles Times.