Robert L. Hardesty, center, and two other aides talk with President Lyndon B. Johnson in the Oval Office. (LBJ Library Photo by Yoichi Okamoto)

Robert L. Hardesty, a speechwriter for Lyndon B. Johnson who also shaped the president’s legacy by assisting with his White House memoir, died July 8 in Austin. He was 82.

His death, from congestive heart failure, was announced by the LBJ Presidential Library.

Mr. Hardesty pursued a wide-ranging career, including stints as press secretary to then-Texas Gov. Dolph Briscoe, president of what is now Texas State University and chairman of the U.S. Postal Service’s board of governors. But he was perhaps best known as an aide to Johnson from 1965 until shortly before Johnson’s death in 1973.

Mr. Hardesty joined the White House after a stint as chief speechwriter for Postmaster General John A. Gronouski, a prominent Democratic official and campaigner who was reported to have averaged, at times, more than one speech a day. During the 1964 campaign, when Gronouski spoke widely on the civil rights movement, Mr. Hardesty wrote many of his speeches.

After Johnson’s landslide election victory in 1964, Mr. Hardesty told the Miller Center at the University of Virginia, the White House asked the Democratic National Committee for the 50 best campaign speeches written for Cabinet officials in the previous year or so. Forty of them were by Mr. Hardesty. He was hired, along with speechwriter Will Sparks from the office of the defense secretary.

Mr. Hardesty recalled that, as far as Johnson was concerned, “brevity was the cardinal rule” for speechwriters.

“ ‘Four-letter words . . . four-word sentences . . . and four-sentence paragraphs,’ ” he told author Robert Schlesinger for the book “White House Ghosts: Presidents and Their Speechwriters.” “You’ve got to write it so that the charwoman who cleans the building across the street can understand it.”

Johnson also demanded that speeches make news. In 1966, with only a few hours of advance notice, Mr. Hardesty was assigned to write a speech for Johnson to deliver after being honored for his work on the space program. Johnson objected to the first draft, finding it insufficiently newsy.

After consultation with space officials on the status of the Apollo program, Mr. Hardesty added a line: “We intend to land the first man on the surface of the moon and we intend to do it in this decade of the sixties.”

Mr. Hardesty assumed that the president would make sure the line — and its implicit commitment to beating the Soviets in a manned lunar landing — was fully accurate before delivering it.

After the speech, a top space official called Mr. Hardesty and complained that he had thrown the space program into disarray. At the end of the day — which Mr. Hardesty assumed would be his last in the White House — he ran into Johnson.

“That speech you wrote for me this morning,” the president said, according to Schlesinger’s book, “now that’s what I call a news lead.”

Neil Armstrong did, in fact, become the first man to walk on the moon, in 1969.

Like other speechwriters, Mr. Hardesty sometimes butted heads with Johnson over how the president should present himself to the public. The speechwriters saw the rhetorical potential of the country charm that Johnson displayed for small audiences but that seemed to evaporate when he went before a camera. Johnson, on the other hand, wished to appear statesmanlike.

That conflict resurfaced after his presidency, when Mr. Hardesty joined the team of associates who traveled to Texas to work with Johnson on his memoir, published in 1971 as “The Vantage Point: Perspectives of the Presidency, 1963-1969.”

Johnson rejected his aides’ initial drafts of his memoirs, asking for them to appear more presidential. In an interview, Harry Middleton, a Johnson speechwriter who later became director of the LBJ Presidential Library in Austin, recalled Mr. Hardesty’s disappointment. “We’re going to make this guy sound like a prime minister,” he told Middleton.

In the end, it was Johnson’s book, and the memoir reflected his vision for it. Johnson had always admonished his speechwriters to have a “passion for anonymity.”

Robert Lewis Hardesty was born June 4, 1931, in St. Louis. He graduated from George Washington University, served in the Army in the 1950s and early in his career was a reporter and columnist at the Army Times.

In 1976, after a few years working for Briscoe, Mr. Hardesty was named vice chancellor for governmental affairs at the University of Texas System. He was nominated by President Gerald R. Ford to the Postal Service board of governors and served as chairman from 1981 to 1984, a period marked by divisive controversy over hikes in postage rates.

In 1981, Mr. Hardesty became president of Southwest Texas State University, Johnson’s alma mater. During his seven-year tenure, its permanent endowment grew from $400,000 to $7 million.

In 1988, Mr. Hardesty was fired by university regents who cited “philosophical differences” and argued that he spent too much time and money on the road. Mr. Hardesty sued and alleged that, as a prominent Democrat serving the state university under a Republican governor, he had been terminated for political reasons. In 1991, a jury found that his firing had been motivated by politics. In a settlement, Mr. Hardesty received more than $1 million from the regents of the state university system. He was named president emeritus.

His wife of 59 years, Mary Roberts Hardesty, died in 2011. Survivors include his wife of one year, Alice McDonald Hardesty of Austin; four children from his first marriage, Elizabeth Hurst of Houston, Ann Hardesty of Oakland, Calif., and Bruce Hardesty and John Hardesty, both of Austin; a stepdaughter, Michel McDonald of Nashville; and three grandchildren.

In the Miller Center oral history, Mr. Hardesty recalled that Johnson once introduced him and Sparks to a prominent guest as “two of the best speech writers a president ever had. . . . And then he defined what he considered the best speech writers a president ever had. They are not temperamental, they don’t miss deadlines, they don’t get drunk the night before a major speech.”