Bob Auerbach, a longtime political activist who helped found the Green Party in Maryland and was a three-time candidate for the U.S. House of Representatives in Maryland, died Dec. 12 at Prince George’s Hospital Center in Cheverly. He died two days before his 93rd birthday.

Mr. Auerbach was struck by an automobile that evening while walking to the post office near his home in Greenbelt. His daughters, Hopi Auerbach and Jennine Auerbach, confirmed their father’s death. The accident, which remains under investigation by the Greenbelt police, was reported in various news accounts.

Mr. Auerbach, who worked as a librarian for many years, defined his life more by his activism than his profession. He began airing his outspoken political views in the 1930s as a pacifist and advocate for nonviolence and continued to embody those ideals throughout his life.

He joined the War Resisters League, one of the country’s oldest pacifist organizations, in 1939. He received a physical deferment during World War II because a childhood illness permanently damaged his left leg.

During the 1940s, Mr. Auerbach was active in the Fellowship for Reconciliation, a group promoting nonviolence, and the Young People’s Socialist League. He became a full-fledged member of the Socialist Party in 1952, and his family said he was dismissed from a job in the 1950s because of his political beliefs.

Bob Auerbach, a longtime political activist and a founder of the Green Party in Maryland, also worked as a reference librarian at the University of the District of Columbia. He was a three-time candidate for Congress, including a run in November at age 92. (Family Photo)

In later years, Mr. Auerbach often protested U.S. military involvement abroad, and he demonstrated at the headquarters of the National Rifle Association against the proliferation of guns. Each Christmas, he led a demonstration for animal rights at the National Zoo.

In 1997, Mr. Auerbach helped organize the Green Party in Maryland, and he was the party’s nominee for Congress from the 5th District in 2002, 2004 and 2012.

A 2004 Baltimore Sun article described him as “at the purist edge of the Maryland Green Party’s ideological spectrum, a kind of political maharishi.”

Explaining his views during this year’s election campaign, Mr. Auerbach said, “We need a voice for nonviolence in Congress. End destructive and costly U.S. wars around the world. Bring all the troops home. Instead of violent policies and costly hardware, we should develop peaceful, nonviolent, goodwill methods.”

He received 5,040 votes in November, or 1.5 percent. Rep. Steny H. Hoyer (D) , the incumbent, won more than 69 percent of the vote.

Mr. Auerbach also ran unsuccessfully for Maryland comptroller in 2006 and for the Greenbelt City Council in 1999.

After Green Party candidates were excluded from ballots in Maryland, Mr. Auerbach was a lead plaintiff in a 2003 lawsuit charging the state with discriminating against alternative political parties. Maryland’s highest court, the Court of Appeals, ruled that it was unconstitutional to require third parties to submit two separate petitions to have a spot on the ballot.

Robert Shipley Auerbach was born Dec. 14, 1919, in New York City. He received a bachelor’s degree in political science from New York University in 1948 and a master’s degree in library science in 1956 from Peabody College, now part of Vanderbilt University in Nashville.

After living in Ohio and West Virginia in the 1950s, Mr. Auerbach came to the Washington area in 1961. He drove a taxi for more than 10 years and also owned the Capital Library Service, a cataloguing service for colleges and small libraries. He was a librarian at the Department of Housing and Urban Development before working as a reference librarian at the University of the District of Columbia from 1972 to 1987.

His marriage to the former Mary Carson ended in divorce.

Survivors include two daughters, Hopi Auerbach of Greenbelt and Jennine Auerbach of Baltimore; a brother; and two grandchildren.

Throughout his life, Mr. Auerbach was involved in campaigns for nonviolence, animal rights groups and third-party movements. In the 1970s, he chaired the People’s Party in Maryland, which supported Benjamin Spock for president in 1972.

As an early participant in civil rights demonstrations in the 1940s, Mr. Auerbach occasionally endured beatings. He was a marshal at the 1963 March on Washington, during which the Rev. Martin Luther King Jr. delivered his “I Have a Dream” speech.