Sam Bass Warner Jr., a distinguished urban historian, died on Jan. 22 in Needham. He was 94.

He was the son of law professor and U.S. government official Sam Bass Warner Sr. and Helen Binninger Wilson Warner. He attended the Cambridge School of Weston and Harvard and Yale universities. He taught at M.I.T., Washington University in St. Louis, the University of Michigan, Boston University and Brandeis University.

Among his many award-winning books were Streetcar Suburbs: The Process of Growth in Boston, 1870-1900; The Private City: Philadelphia in Three Periods of Its Growth; The Province of Reason; The Urban Wilderness: A History of the American City; The Way We Really Live: Social Change in Metropolitan Boston Since 1920; To Dwell Is To Garden: A History Of Boston’s Community Gardens; and Restorative Gardens: The Healing Landscape, written with Nancy Gerlach-Spriggs and Richard Kaufman.

Sam prided himself on being a citizen scholar active in many political causes, from opposition to the Vietnam War to support for the community garden movement. In addition to his teaching, scholarly and political work, he was an enthusiastic gardener, carpenter, artist and pianist.

He spent many happy summers on the Vineyard, first at Quenames and then on Tisbury Great Pond. He wrote some of his books in a room at the Whiting’s Davis House in West Tisbury. For sailing in the Pond Sunday sailboat races, he built himself a wooden Sunfish.

He is survived by his second wife, Diana Jean Kleiner; by his children Rebecca, William, Kate and Alice; by his grandchildren Daniel, Eve, Sashka and Jonah; and by his dear friend and colleague Nancy Gerlach-Spriggs. His first wife, Lyle Lobel Warner, died in 2014.

A memorial service will be announced in the coming weeks.

Memorial contributions may be made to the Boston Public Library.