William T. Coleman Jr in 1977. (Associated Press/Associated Press)

William T. Coleman Jr., who helped draft the landmark 1954 legal case in which the Supreme Court ruled that segregation in public schools was illegal and who later became the country’s second black Cabinet officer after President Gerald R. Ford named him transportation secretary, died March 31 at his home in Alexandria, Va. He was 96.

The cause was complications from Alzheimer’s disease, said a daughter, Lovida Hardin Coleman Jr.

Throughout his long career, Mr. Coleman was often at the forefront of major public events, legal battles and significant social advances. In 1948, he became the first African American to serve as a law clerk to a Supreme Court justice, and within two years he was working alongside Thurgood Marshall of the NAACP’s Legal Defense Fund on major desegregation cases.

In the 1960s, Mr. Coleman was a staff lawyer for the Warren Commission, investigating the assassination of President John F. Kennedy. He defended young civil rights activists known as Freedom Riders and successfully argued a Supreme Court case that helped eliminate prohibitions against interracial marriage.

A progressive Republican, Mr. Coleman was an adviser to every president, Republican and Democrat, from Dwight D. Eisenhower to George W. Bush.

“He opened many, many doors and, by example, showed how absurd discrimination really is,” Supreme Court Justice Stephen G. Breyer told the Philadelphia Inquirer in 2010. “It is important that people who don’t know him understand what he has done.”

Mr. Coleman began working with Marshall on the Brown case in 1950, coordinating research efforts in 37 states. Ultimately, five cases — from Kansas, South Carolina, Virginia, Delaware and the District of Columbia — collectively came to be known as Brown v. Board of Education. Mr. Coleman helped write the legal briefs, which formed the basis of Marshall’s arguments before the Supreme Court in December 1952 and again one year later.

The high court unanimously ruled in May 1954 that “in the field of public education the doctrine of ‘separate but equal’ has no place.”

Ten years later, in the case of McLaughlin v. Florida, Mr. Coleman argued against a Florida law that barred “any negro man and white woman, or any white man and negro woman” from living together. The Supreme Court overturned the law and, three years later, declared all prohibitions against interracial marriage unconstitutional.

In all, Mr. Coleman appeared before the Supreme Court 19 times, including a 1982 case, Bob Jones University v. United States, in which he argued that private schools practicing racial discrimination should not receive federal tax exemptions. The court agreed by a vote of 8 to 1.

Mr. Coleman served as president and later chairman of the NAACP Legal Defense Fund, but in 1976 he told The Washington Post, “I really don’t think this ‘first black’ this and that is relevant. I’m trying to make a reputation in this town that’s not based on color.”

While working at the Philadelphia-based firm of Dilworth Paxson, he developed a specialty in transportation law. That background helped lead Ford to nominate Mr. Coleman as transportation secretary in 1975.

His oath of office was administered by Marshall, by then a Supreme Court justice. Mr. Coleman became the second black member of the Cabinet, after Robert C. Weaver, who was secretary of housing and urban development from 1966 to 1968.

In a controversial decision as transportation secretary, Mr. Coleman agreed to allow the supersonic Concorde airliner to land at Dulles International Airport outside Washington and John F. Kennedy airport in New York.

He tried to shore up the country’s struggling railroad industry but opposed subsidies for passenger trains on money-losing routes. He angered Amtrak officials when he said the viability of passenger trains was “very much like the outhouse. At one time it made a lot of sense, but once you got plumbing, there is no doubt you put out of business the people who made outhouses.”

Late in his 22-month tenure, Mr. Coleman ruled against making air bags mandatory safety equipment on new cars because the public would not like the “unfamiliar and controversial technology.”

Consumer advocate Ralph ­Nader called the decision “horrendous and irresponsible,” and air bags were not required by federal law until 1998.

William Thaddeus Coleman Jr. was born July 7, 1920, in Philadelphia. His father, director of the Germantown, Pa., boys club, introduced his son to civil rights leaders, including W.E.B. Du Bois.

When Mr. Coleman tried out for the swim team at Germantown High School, the team was disbanded. He graduated in 1941 from the University of Pennsylvania, where he was elected to the Phi Beta Kappa honor society.

After a year at Harvard Law School, Mr. Coleman joined the Army Air Forces, where he served as a defense counsel in court-martial cases during World War II.

In law school, he was one of the first black students to serve on the law review’s editorial board. He graduated in 1946, ranked first in his class. He spent a year of postgraduate study at Harvard before clerking for a federal judge, then in 1948 became a clerk for Supreme Court Justice Felix Frankfurter.

Another of Frankfurter’s clerks was Mr. Coleman’s law school classmate, Elliot L. Richardson, who later served as U.S. attorney general and held three other Cabinet posts.

“He had strong views on a variety of subjects,” Richardson said of Mr. Coleman in 1975, “but he always approached a case with strict legal and constitutional perspective — and brother, he was sharp.”

The two remained lifelong friends. Mr. Coleman reportedly turned down an offer from Richardson to be a special prosecutor during the Watergate scandal. He also rejected an overture from President Lyndon B. Johnson to become a federal judge.

After serving as transportation secretary, Mr. Coleman joined the Washington office of the O’Melveny & Myers law firm. He served on many corporate, educational and cultural boards and stepped in and out of government advisory roles well into his 80s.

Survivors include his wife of 72 years, the former Lovida Hardin of Alexandria; three children, Lovida Hardin Coleman Jr. of McLean, Va., William T. Coleman III of Penn Valley, Pa., and Hardin Kennedy Coleman of Boston; and four grandsons.

In 1995, Mr. Coleman received the country’s highest civilian honor, the Presidential Medal of Freedom, from President Bill Clinton — a law school roommate of one Mr. Coleman’s sons.

“If you are looking for an example of constancy, consistency, disciplined devotion to the things that make this country a great place,” Clinton said at the time, “you have no further to look than William Coleman Jr.”