John Cosgrove, left, delivering a National Press Club membership card to President John F. Kennedy in 1961. (National Press Club/National Press Club)

John Cosgrove, who held executive positions with a broadcasting magazine and later operated a public relations firm, and who was known to generations of Washington journalists as the grand old man of the National Press Club, died Oct. 15 at his home in the District. He was 98.

The cause was a heart ailment, said Michael Clark, a longtime friend.

Mr. Cosgrove, who began working as a journalist in Washington in the 1930s, was president of the Press Club in 1961. Days after John F. Kennedy’s inauguration, Mr. Cosgrove welcomed the president to the Press Club and peronally presented him with a membership card.

Kennedy, who had been offered free memberships in other clubs, thanked the Press Club for having “the decency to charge me the initiation fee and dues” and wrote a check to cover the cost.

“John was one of the best ambassadors we’ve ever had for the Press Club,” Thomas Burr, a correspondent for the Salt Lake Tribune and the current club president, said Saturday. “I personally loved sitting down and having a chat and talking about the good old days.”

Mr. Cosgrove began working at the National Press Building in 1937, when he joined the Associated Press, and had an office in the same building for more than 70 years.

From 1948 to 1968, he was director of publications of Broadcasting Publications, which published Broadcasting magazine, the weekly trade journal of the radio and television industry. He later had a public relations business, with clients including railroads, health industry groups and J. Willard Marriott, founder of the Marriott hotel chain.

Mr. Cosgrove played a key role in launching “Honor America Day,” a Fourth of July celebration held on the Mall in the early 1970s. He retired in his mid-90s.

He joined the National Press Club in 1948 and knew many of the earliest members of the club, which was founded in 1908 and for many years had a close association with the White House and Congress. He edited the club’s 50th anniversary history in 1958 and was the guardian of the club’s institutional memory well into the 21st century.

“Cosgrove had an encyclopedic memory of Press Club history,” Gil Klein, a former club president, wrote Saturday in an email. “He could look at a picture from a half-century ago and identify everyone in it. . . . A great piece of the club’s institutional memory has gone with him.”

Mr. Cosgrove was an almost-daily presence at Press Club events and the members’ bar, the Reliable Source, until shortly before his death. He attended the dedication of a room in his honor at the club last month.

“John was a terrific raconteur,” former club president Frank A. Aukofer said in an interview. “If you got him to tell stories, he could talk for a week.”

John Patrick Cosgrove was born Sept. 25, 1918, in Pittston, Pa. His father was a car dealer.

After working for a newspaper in Wilkes-Barre, Pa., Mr. Cosgrove came to Washington and worked as a dictation specialist for the Associated Press. In 1940, he became a speechwriter for the National Republican Congressional Committee and later worked on Capitol Hill as an assistant to Sen. Hiram Johnson (R-Calif.). Mr. Cosgrove served in the Navy for four years during World War II, first in Washington and later on a destroyer escort in the Pacific.

He was a member of the board of the Navy Memorial Foundation and, in the weeks before his death, received its highest honor, the Lone Sailor Award.

Mr. Cosgrove was also prominent in Irish American organizations, including the Friendly Sons of St. Patrick, and for many years was a marshal of Washington’s annual St. Patrick’s Day parade.

His wife of 51 years, Patricia O’Hara Cosgrove, died in 2002. He had no immediate survivors.

At Mr. Cosgrove’s 1961 inauguration as Press Club president, Kennedy had to leave before the oath of office was administered by Chief Justice Earl Warren.

On his way out, Mr. Cosgrove recalled in an official history of the Press Club, Kennedy “looked at me directly and said, ‘I’m sorry I can’t stay longer, but be sure to keep your hand on the Bible.’ ”