Sen. Joseph Tydings (D-Md.), at right, confers with New York mayor John V. Lindsay during a meeting of the Senate Judiciary Committee to discuss gun control legislation, June 26, 1968. (Bob Daugherty/AP)

Joseph D. Tydings, a Maryland politician whose dashing looks and progressive leanings led John F. Kennedy to tap him for U.S. Attorney and then propelled him to the Senate, where his gun-control efforts helped bring about his defeat after one term, died Oct. 8 at his home in Washington. He was 90.

The cause was cancer, said a daughter, Mary Tydings Smith.

In many ways, Mr. Tydings epitomized Maryland’s Democratic establishment. His father, Millard Tydings, served four terms in the Senate. His grandfather and namesake on his mother’s side, Joseph Davies, was an adviser to President Woodrow Wilson and later U.S. ambassador to the Soviet Union in the 1930s. When the future senator was still a boy, Davies married one of the richest women in the country, cereal heiress and Washington socialite Marjorie Merriweather Post.

But in seeking to carve his own career in the early 1960s, Joseph Tydings broke ranks with party leaders — including Gov. J. Millard Tawes and a coalition of political ward bosses in the city of Baltimore — to capture the Senate nomination in the Democratic Party primary. He ran against and defeated Maryland’s popular comptroller Louis L. Goldstein, then in the 1964 general election unseated incumbent Sen. J. Glenn Beall. (R).

The Tydings victory came as a major step in the dismantling of the rural and Baltimore City political alliance that had governed Maryland for decades and had excluded the burgeoning post-World War II suburbs around the urban centers of Washington and Baltimore. He lost his bid for reelection in 1970 to Republican J. Glenn Beall Jr., the son of the man he had defeated six years earlier.

Mr. Tydings first ran for political office in 1954, winning a seat from Harford County in the Maryland House of Delegates that he would hold for six years. He managed the Democratic presidential primaries for then-Sen. Kennedy of Massachusetts in the Delaware and Florida primaries.

When Kennedy won the presidency in 1960, he named Joseph Tydings the U.S. Attorney for Maryland, and he rode that office to statewide prominence. As the state’s chief federal prosecutor, he won convictions and jail sentences for corruption and conflicts of interest against the speaker of the Maryland House of Delegates A. Gordon Boone and two congressmen, Thomas F. Johnson (D-Md.) and Frank Boykin (D-Ala.), tied to Maryland Savings and Loan scandals of that era.

Thousands of investors lost millions of dollars in the collapse of several Maryland savings-and-loan associations. The trials were widely publicized in Washington and Baltimore, and Mr. Tydings projected an image as the knight on the white horse, righting the wrongs done to innocent investors.

In 1963, President Kennedy visited the 550-acre Tydings family estate on the Chesapeake Bay in Harford County, there urging the federal prosecutor to run for Senate the following year. He was good-looking and athletic — having played lacrosse and football in college — and he fit the Kennedy image of energy, vigor and ambition. His campaign slogan was “Working for Maryland, Not the Machine.”

During his six years in the Senate, he supported civil rights legislation such as the Voting Rights Act of 1965 and the Fair Housing Act of 1968. He opposed the nominations of President Richard M. Nixon’s embattled U.S. Supreme Court nominees Clement F. Haynsworth Jr. and G. Harrold Carswell, both of whom were defeated. He came out against the Vietnam War.

Kennedy was felled by an assassin’s bullet in 1963, and his brother, Sen. Robert F. Kennedy (D-N.Y.), met the same fate five years later. Appearing on NBC-TV’s “Meet the Press” a few days after Robert Kennedy’s killing, Mr. Tydings came out strongly in favor of gun control.

He introduced in the Senate a bill that would have required registration of all purchased guns and created licensing requirements intended to keep guns away from criminals and chronic drug addicts. It never had a chance to pass, but the National Rifle Association never forgot it either.

In 1970, the NRA campaigned hard against him using slogans such as “If Tydings Wins, You Lose.”

“I had probably done more hunting than most of the members of the board of the National Rifle Association,” Mr. Tydings told the Capitol News Service in 2013. He said he had been regular duck hunter for decades and owned seven shotguns.

Mr. Tydings was born Joseph Davies Cheesborough in Asheville, N.C., on May 4, 1928. His parents divorced in 1935, and his mother, the former Eleanor Davies, married Millard Tydings, then in his second term in the U.S. Senate. The senator formally adopted Joseph.

Millard Tydings lost reelection to his Senate seat in 1950 soon after having been appointed to head a committee to investigate claims of communist penetration of the federal government leveled by Sen. Joseph R. McCarthy (R-Wis.). The two men clashed repeatedly at hearings on the issue, with McCarthy charging at one point that Millard Tydings was an “egg-sucking liberal.”

Meanwhile, Joseph Tydings graduated in 1946 from the private McDonogh School in Owings Mills, Md., then served in the Army during the occupation of post-World War II Germany. He graduated from the University of Maryland in 1950 and from its law school in 1953.

Mr. Tydings lost the 1976 Maryland Democratic senatorial primary to then-Rep. Paul Sarbanes. He practiced law until age 90 and also served 15 years on the University of Maryland Board of Regents.

His marriages to Virginia Reynolds Campbell, Terry Lynn Huntingdon, Rosemary Kayser and Kate Clark ended in divorce.

Survivors include four children from his first marriage, Mary Tydings Smith of Easton, Md., Millard Tydings of Skillman, N.J., Emlen Tydings Gaudino of Palm Beach, Australia, and Eleanor Tydings Gollob of McLean, Va.; a daughter from his second marriage, Alexandra Tydings Luzzato of Washington; and nine grandchildren.

This spring, former senator Tydings published a memoir, “My Life in Progressive Politics: Against the Grain.”

In the book, he described the night in 1970 when he walked from his campaign headquarters over to a Baltimore hotel to make his concession speech. He wondered if the NRA was to blame or if he should have been more restrained in his rhetoric.

“I thought I was stronger than I was,” he wrote. “I lost that election myself. Success in politics and in life, whatever advantages you may have at the start, comes down to your own judgment.”

CORRECTION: An earlier version of this story incorrectly reported the title of Joseph Tydings’s memoir. It was “My Life in Progressive Politics,” not “My Life in Politics.” The story has been revised.