Herbert Foerstel, a librarian with the University of Maryland, College Park, died of natural causes Sept. 20 at the Harbor Medical Center in Baltimore. The longtime resident of Columbia was 90.

Born in St. Louis, he was the second oldest of five children.

His mother, Margaret, was a classical pianist, and his father, William “Zutty” Foerstel, was a Dixieland jazz drummer who played in popular bands.

Mr. Foerstel’s musical roots led him to be an avid jazz fan who amassed a collection of more than 500 albums during his lifetime.

His parents divorced when he was a toddler, and his mother married John Boe, a door-to-door encyclopedia salesman who eventually became chairman of the board and president at P.F. Collier.

His stepfather’s job led the family to move frequently during his childhood. They lived in Indianapolis, Detroit, Los Angeles and Chicago and on Long Island.

After graduating from Hamilton College in 1955, he joined the Army and served as a radar specialist in New Mexico from 1955 to 1958 before attending Rutgers University, where he received his master’s degree in library science.

He began his library career at what is now Towson University before joining the University of Maryland, College Park, where he became head of the Engineering and Physical Sciences Library and later head of branch libraries.

Mr. Foerstel met his wife, Lenore Foerstel, while they both worked at Towson. He worked in the school’s library; she was an art teacher. He continued his work at the University of Maryland for three decades.

Mr. Foerstel learned of the FBI’s surveillance of college libraries in 1986 after agents visited libraries he oversaw, requesting the book-lending records and reading materials of anyone with “foreign-sounding names.”

He instructed his staff not to comply with the requests and worked with university officials to institute a policy protecting the privacy of the school’s library records.

Mr. Foerstel collaborated with state lawmakers to push for legislation guaranteeing the privacy of all Maryland library records. Following the passage of the legislation in 1988, he was invited to the bill’s signing ceremony with then-Gov. William Donald Schaefer.

He also testified in front of Congress and worked with late California U.S. Rep. Don Edwards to address what was called the FBI’s “Library Awareness Program,” a Cold War effort in which agents visited college libraries, demanding details about library use by people from countries deemed “hostile to the United States.”

“It is our obligation to maintain what has traditionally been a relationship of trust and confidence between library users and librarians,” Mr. Foerstel told the “MacNeil/Lehrer NewsHour” in 1988, appearing alongside Assistant FBI Director for Intelligence James Geer, who led the program.

Mr. Foerstel won the Hugh Hefner First Amendment Award in 1988.

“He was incredibly humble and thought it was a joke when he first heard about the Hugh Hefner award,” said Karen Foerstel, his daughter. “He wasn’t always comfortable with public attention, but he taught me to always speak up for what you believe in.”

Mr. Foerstel published “Surveillance in the Stacks: The FBI’s Library Awareness Program” in 1991. He went on to publish 10 more books.

He served as a board member of the National Security Archives and the Freedom to Read Foundation.

Mr. Foerstel’s wife died in 2018.

He is survived by his daughter, Karen, of Lancaster, Pennsylvania; another daughter, Helen Cooke, of Columbia; his son, Jonathon Foerstel, of Los Angeles; his older sister, Joan Slagle, of Cherry Hill, New Jersey; younger sister, Margaret Boe Birns, of New York City; younger sister, Karen Gatlin, of Laurence Harbor, New Jersey; three grandchildren; and four great-grandchildren.

His youngest brother, John “Dobby” Boe, of Berkeley, California, died in August at the age of 80.

“He was adored,” Ms. Cooke said. “He was cherished and loved by his brothers and sisters. Since his brother passed last month, the family is still reeling.”

Memorial arrangements for Mr. Foerstel have been set for Nov. 2 from 7 p.m. to 10 p.m. at the Historic Oakland Manor located at 5430 Vantage Point Road in Columbia.