Thomas J. D’Alesandro III, the scion of a Maryland political dynasty who led Baltimore as mayor during the 1968 riots after the assassination of the Rev. Martin Luther King Jr., left politics and decades later saw his sister, House Speaker Nancy Pelosi, pick up the family mantle, died Oct. 20 at his home in Baltimore. He was 90.

The cause was complications from a stroke, according to a spokesman in Pelosi’s office. In a statement, the speaker called her brother “the finest public servant I have ever known.”

Known as “Young Tommy,” Mr. D’Alesandro was the oldest son of Thomas J. “Big Tommy” D’Alesandro Jr., who had been one of Maryland’s dominant civic leaders in the mid-20th century as a state delegate, congressman and, from 1947 to 1959, the mayor of Baltimore. Pelosi, Mr. D’Alesandro’s youngest sibling and only sister, grew up to become a California congresswoman and twice the nation’s most powerful female elected official.

When Mr. D’Alesandro took the oath of office as Baltimore mayor on Dec. 5, 1967, it seemed like the fulfillment of a political prophecy that he might take over the Democratic fiefdom that his father had stitched together over three decades.

Mr. D’Alesandro’s four years as mayor began at a wrenching time for U.S. cities with large African American populations. Violent civil unrest had unfolded from the Watts neighborhood in Los Angeles to Newark. Baltimore, Mr. D’Alesandro later reflected to NPR, was “a segregated city  . . . a Southern city,” but he held out hope that its long-established black middle and professional class would help his metropolis avoid upheaval.

He had been in office only four months when King’s assassination in Memphis on April 4, 1968, triggered rioting in more than 100 cities. During that brief period, Mr. D’Alesandro had appointed African Americans to several city commissions and boards where none had previously served, and he took stands in favor of civil rights and integration that led to him getting booed at “I Am an American Day” parades.

He had a track record of personal commitment “to equality and civil rights,” said Matthew Crenson, a Johns Hopkins University scholar of Maryland politics.

In the early days after the assassination, Baltimore remained quiet while Washington, Chicago and other cities erupted in violence. “I was starting to feel it was too calm,” he told the Baltimore Sun years later, recalling the preparations that he began making for potential unrest, including meeting with police and local African American leaders.

But then, on April 6, late in the afternoon of a warm spring Saturday, someone tossed a brick through a plate-glass store window in a black neighborhood. Within hours, the city was engulfed in rioting, burning and looting.

It took all of Baltimore’s police force, 500 Maryland State Police officers, thousands of members of the Maryland National Guard and 5,000 soldiers from the Army’s 82nd Airborne Division to restore order.

The riots left six dead and 700 injured. There were 1,032 fires, 4,500 arrests and 1,075 businesses looted; many of the stores never reopened.

After the riots, Mr. D’Alesandro presided over the enactment of a Baltimore civil rights bill guaranteeing access to public accommodations, won approval of an $80 million bond issue to build schools and created summer recreation programs that included mobile swimming pools and day camps for city youths.

Baltimore also suffered from loss of manufacturing jobs, labor strife and white flight, but, for years, observers speculated that the riots were principally responsible for driving Mr. D’Alesandro out of politics, an interpretation that he rejected. He told the Sun decades later that, while in office, he continued to map out his political trajectory, including a possible run for governor, before deciding against it.

He cited financial concerns among the chief reasons that kept him from seeking another term in 1971. He had five children to support, he said, and couldn’t do it on the mayor’s salary. “I was clearing only $695 every two weeks,” he told the Sun in 1998. “I couldn’t make ends meet.

Mr. D’Alesandro began to hint in the final year of his mayoralty that he would serve only one term. The decision still came as a shock when he made it official. “My father was devastated,” he told the Sun. “He thought I was crazy.”

He went into legal practice in Baltimore, away from the public spotlight, specializing in workers’ compensation and personal injury cases. He retired in 1994.

Thomas Ludwig John D’Alesandro III was born in Baltimore on July 24, 1929, and grew up in the Little Italy neighborhood near the city’s Inner Harbor. His mother, the former Annunciata “Nancy” Lombardi, was born in Naples, grew up in Baltimore and became a devoted political wife, helping organize her husband’s campaigns and representing him when he was unavailable to constituents.

In 1952, when Mr. D’Alesandro married Margaret “Margie” Piracci at the Baltimore Basilica, the Sun called it “Baltimore’s equivalent of a royal wedding,” and more than 5,000 people were present. The city fire department had to turn some away.

Big Tommy was his son’s best man. The pope sent his blessing, and President Harry S. Truman sent a silver tray. Little sister Nancy was a bridesmaid.

In addition to his wife and his sister, survivors include five children; a brother; 10 grandchildren; and three great-grandchildren.

Mr. D’Alesandro graduated from Baltimore’s Loyola College in 1949 and from the University of Maryland law school in 1952. He served four years in the Army, won a seat on the city Board of Elections Supervisors and then, in 1962, on the City Council, where he served the next year as president. In his 1967 race for mayor, he crushed the opposition — lawyer and future Baltimore Orioles owner Peter Angelos — in the Democratic primary. Mr. D’Alesandro easily won the general election in November. He was 38.

In addition to financial pressures, the social imperatives of politics weighed on him, Mr. D’Alesandro told the Sun.

“I never liked the social aspect of politics. I loved government. My father loved it all. He loved the people. He loved everything about it. Not me,” he said.

“My father would go into a funeral establishment,” he said, “visit the party of the deceased he had known. Then he’d visit every other alcove in the funeral home. He’d turn his visit into a political rally. I’d go into a funeral home, pay my respects to the one person I knew there, sign the book and leave. Nobody would know I was there.”

Mr. D’Alesandro toyed with the idea of running for governor, mostly because the job came with a bigger salary, but other Democrats stood in his way. Maryland House Speaker Marvin Mandel had been elevated in 1969 to finished the term of Gov. Spiro T. Agnew, who resigned to become Richard M. Nixon’s vice president. Kennedy in-law R. Sargent Shriver, a Maryland native, former Peace Corps director and U.S. ambassador to France, was also exploring a run.

“Mandel had the advantage of incumbency,” Mr. D’Alesandro recalled to the Sun in 1998. “He had a political base in Baltimore. Shriver had all that Kennedy money.” Mandel went on to serve as the state’s chief executive for much of the 1970s.

Mr. D’Alesandro became an occasional adviser to his sister, 11 years his junior, who carried the family’s political ambitions to a national level. Often asked to comment on the environment that shaped her, he spoke with admiration about her decision to start a political career in San Francisco, across the country from her home city. And he offered a bit of personal insight about her drive toward public service. “It’s not a choice,” he once told the Orlando Sentinel. “It’s just innate in her.”