Fernando Cardenal, a Catholic priest who defied the church to serve as education minister in the Marxist Sandinista government of Nicaragua in the 1980s, a stand that he said reflected his “pact with the poor” and that resulted in his temporary banishment from the Jesuit order, died Feb. 20 in Managua, Nicaragua. He was 82.

His death was reported by the Associated Press, citing an announcement by Fe y Alegria, an international Jesuit educational organization for which Rev. Cardenal served as national director for Nicaragua. The reported cause was complications from surgery.

During the social upheaval in Nicaragua in the 1980s, when leftist Sandinista revolutionaries took power after overthrowing the authoritarian Somoza regime in 1979, Rev. Cardenal landed in the center of a divisive conflict in the Catholic Church.

At the time, a contingent of Catholic priests and theologians, particularly in Latin America, championed a concept known as liberation theology, which envisioned a role for the church to deliver not only spiritual but also economic liberation to the poor. Much of the Catholic hierarchy rejected the theology, judging it as overly influenced by Marxism.

Rev. Cardenal had ministered to the poor during his Jesuit novitiate in Medellin, Colombia, and adhered to liberation theology. As a professor in Nicaragua in the 1970s, he organized a group of students — 14 of whom would die, he told the National Catholic Reporter last year — to protest the Somoza dictatorship and promote a society that they hoped would better serve the needy.

When a member of the Sandinista National Liberation Front (FSLN) asked him to join the group, Rev. Cardenal agreed.

“I told him that he could count on me,” Rev. Cardenal told the National Catholic Reporter. “And he said, ‘From now on, your name will be Justo,’ ” meaning just. “I liked that a lot,” he said.

After the installation of the Sandinista government, Rev. Cardenal led a national literacy campaign in which he described himself as “the general of an army of 100,000” volunteers. They moved into the homes of campesinos, or poor farmers, he once told an interviewer from Georgetown University, and taught them to read.

The campaign reduced the illiteracy rate in Nicaragua from approximately 50 percent to 13 percent in five months, according to figures cited in a UNESCO report.

In 1984, Rev. Cardenal became education minister. He was one of several priests to join the Sandinista government, including his brother Ernesto Cardenal, a poet who served as culture minister. By accepting governments positions, they defied the wishes of Pope John Paul II, under whose leadership priests were prohibited from holding public office.

Popular opinion in Nicaragua appeared to be on the side of the priests. When the pope visited the country in 1983 — a trip in which he memorably wagged his finger at Ernesto Cardenal as the culture minister kneeled before him — the pontiff was heckled during a Mass in Managua.

In August 1984, the Vatican issued a communique reporting that it had requested that Rev. Cardenal and the other priests step down from their government offices. In December 1984, Rev. Cardenal was expelled from the Jesuit order and was suspended from conducting sacerdotal duties until further notice.

“I consider before God that I would commit a grave sin if I abandoned in the present circumstances my priestly option for the poor, which currently takes its concrete form in Nicaragua in my work in the Popular Sandinista Revolution,” he said in a statement.

He said that he and his supporters perceived “that the Vatican’s policy toward Nicaragua coincides with that of President Reagan,” who had sought to support the Contra rebel groups opposing the Sandinistas.

Rev. Cardenal also said that “the Holy See is a prisoner of political concepts reached as a result of the conflicts in Eastern Europe,” an apparent reference to John Paul, who was credited with helping to end the decades of communism in his native Poland.

Rev. Cardenal stepped down in 1990, when the Sandinistas, represented by Daniel Ortega, were voted out of office. In 1995, the priest left the Sandinista National Liberation Front, denouncing “a small minority of Sandinistas, including a few high-ranking leaders,” who committed “acts of corruption” that “broke the Sandinista tradition of honesty and did the FSLN the worst damage in its history.”

He was reinstated as a Jesuit in 1997.

Fernando Cardenal Martínez was born in Granada, Nicaragua, on Jan. 26, 1934. A complete list of survivors was not immediately available, but it includes his brother Ernesto.

Rev. Cardenal told the National Catholic Reporter that he “never spoke with one poor person or indigenous person in all of my 16 years of study to be a Jesuit” before being sent to a poor neighborhood outside Medellin.

Buying bread for the Jesuit community, “I came into contact with small boys and girls,” he recalled, “and I could see the hunger in their faces, and they began to ask me for bread.” He gave away his food.

He later saw a family eating from the Jesuits’ trash. When he left Colombia, he said, he told those neighbors, “I want to leave you a promise, a very solemn promise in the face of God, that I will dedicate my life to the liberation of the poor and to the struggle for justice.”

He later worked at institutions including the National Autonomous University of Nicaragua, where he organized students to protest the Somoza government.

He told the National Catholic Reporter that when he learned the Somoza government had been defeated, he “did two things, which weren’t really correct.” He ran into the street in his pajamas, shouting “Long live the Sandinista revolution” and fired his Soviet rifle into the air.

After clashing with the Vatican over his government job, he told Time magazine that “there is no basic religious problem between the church and the revolution.”

“What exists,” he said, “is a political confrontation.”