Marco Pannella, a maverick Italian politician who galvanized his predominantly Roman Catholic country to legalize divorce and abortion and to grant other civil liberties, died on Thursday in Rome. He was 86.

His death was announced by Radio Radicale, the station he founded in 1976, to the strains of Mozart’s unfinished “Requiem Mass,” as he had requested. The cause was lung and liver cancer.

Mr. Pannella was an unconventional gadfly who dominated the quixotic, cultlike Radical Party, which he co-founded in 1955, and who managed to gain a disproportionate amount of political influence in Italy — far greater than the party’s rank-and-file representation in Parliament would seem to warrant.

In 1979, the party, whose emblem was a fist clutching a red rose, won 18 of 630 seats in the Chamber of Deputies, the larger of Parliament’s two houses, and 3.4 percent of the total popular vote.

Mr. Pannella was an elected member of the chamber from 1976 to 1994 and a member of the European Parliament from 1979 to 2009.

A dogged impresario of civil disobedience and political stagecraft, he championed the rights of women, inmates, gay people and conscientious objectors. He lobbied against the death penalty and the proliferation of weapons, from nuclear arms to guns used by weekend sportsmen to shoot migratory birds.

In 1970, he waged a hunger strike — subsisting for 78 days on three cups of coffee and vitamins daily, and losing 60 pounds — that triggered a parliamentary debate over divorce. Four years later, he invoked the same Gandhian strategy to persuade Parliament to debate abortion legislation and a proposal to grant time on state television for controversial causes.

“We are not claiming that anyone must agree with us,” Mr. Pannella said at the time. “We are merely asking for the chance to present our case.”

His party was ultimately instrumental in gaining support, to the consternation of the Vatican, for referendums and legislation that legalized divorce and abortion and eliminated or loosened other constraints opposed by libertarians.

On another front, Mr. Pannella sought to legalize the recreational use of hashish and marijuana, in part to undermine the Mafia. In 1995, dressed in a canary-yellow Santa Claus suit, he handed out free hashish on Piazza Navona in Rome to protest Italy’s drug laws. He was sentenced to nearly three months in prison, but the penalty was reduced to a fine equivalent to $3,650.

He also denounced Communist governments in Eastern Europe for abridging civil rights, mobilized what amounted to a fledging environmental movement, campaigned to lower the voting age to 18 and crusaded for the creation of a European Union.

In 1979, Mr. Pannella managed to upstage Pope John Paul II’s Easter benediction by staging a reverential march of nonbelievers to St. Peter’s Square on behalf of hungry children. The pope, tacitly acknowledging the marchers, beseeched his audience to care for “the little children who, in their weakness, are the ones who are specially loved by Christ.”

In 1983, as part of a campaign against the deployment of American cruise missiles in Sicily, Mr. Pannella’s Radical Party made available to the public a detailed map listing every military base in Italy where nuclear weapons were stored.

In 2000, he drew international attention by recruiting Ilona Staller, a pornographic film star, to run as the Radical Party’s candidate for Parliament. She won.

Many saw the Radical Party as providing a useful safety valve over several decades of political upheaval.

“In a country with almost no public interest groups for social causes,” Frederic Spotts and Theodor Wieser wrote in “Italy: A Difficult Democracy” (1986), “the party has given tens of thousands of Italians a sense of participation in the political process and offered unorthodox youth the possibility of legitimate political activity — at a time when the alternative for some might have been terrorism.”

Mr. Pannella was born Giacinto Pannella on May 2, 1930, in Teramo, between the Apennine Mountains east of Rome and the Adriatic coast. His father owned a small amount of property, and his mother was of French and Swiss heritage.

He graduated from Rome University and from the University of Urbino with a law degree and worked briefly as a journalist. Mr. Pannella, who never married, is survived by his longtime companion, Mirella Parachini.

Prime Minister Matteo Renzi eulogized Mr. Pannella as a “lion of freedom.”

The Vatican, too, praised him, despite their many clashes. A Vatican spokesman, the Rev. Federico Lombardi, said Mr. Pannella “was someone with whom we often disagreed, but who one couldn’t but appreciate for his total and disinterested commitment to noble causes.”

Correction: May 22, 2016

An earlier version of this obituary misspelled Mr. Pannella’s surname as Panella in two instances.