When the five-member rebel junta left the provisional capital of Leon July 20 in a victorious 60-mile motorcade to the Nicaraguan capital, it carried an important passenger.

The bishop of Leon, in his white-and-purple robes, rode in the front seat of one of the Mercedes-Benz cars.

When the junta finally arrived to the cheers of thousands at the national palace here, its members met with and were sworn into office by Archbishop Miguel Obando y Bravo.

Church bells throughout the country pealed an end that day to the 42-year Somoza dictatorship. It was appropriate that the people heard the message from their churches.

The repression by the Somoza regime become so great that it threw the Roman Catholic Church, probably the most influential social institution here and in all of Latin America, solidly behind the Sandinista guerrillas' armed overthrow of the government.

In fact, through several of its leaders, the church was deeply involved in shaping the events that led to the exile of former president Anastasio Somoza.

The rebel junta named as its foreign minister the Rev. Miguel D'Escoto, 46, a priest of the Maryknoll order and an advocate of the "theology of liberation," which is gaining popularity in the Latin American church.

The new government's minister culture is a U.S.-trained Trappist monk and poet, the Rev, Ernesto Cardenal. And Archbishop Obando was a key mediator at the end of the conflict and is credited, along with the Red Cross, with preventing bloody reprisals against Somoza's national guard.

Up until 1971, the Roman Catholic Church in this country of about 2,5 million people was silent on the subject of Somoza. In fact, when Archbishop Obando became the leader of the church in 1969, Somoza presented him with a Mercedes-Benz.

But Somoza at the time was changing the country's constitution to wipe out the prohibition against his running for president again. His father had done that in the 1940s.

So in 1971, Archbishop Obando and the church's eight bishops issued an open letter to the people of Nicaragua, telling them that they should exercise their conscience in elections. The document said they should participate in the political process, which included not only Somoza's party but others as well,

With the issuance of the open letter, Archbishop Obando returned the Mercedes to Somoza.

Relations between the church and Somoza deteriorated further after the 1972 earthquake that destroyed central Managua and killed 8,000 people, Church leaders were appalled when Somoza and his associates siphoned off large amounts of the aid sent by foreign countries and international relief groups for the rebuilding of Managua.

"Somoza even tried to control the funds of the Catholic Relief Agency during that period," said the Rev. Paul Schmitz, 35, a Capuchin priest here.

"After that, intrigues set in," Schmitz said. "Somoza people opened the archbishop's mail.Somoza called the church leaders and priests communists, He said we were subversives. He made it difficult for us to get our ham radio licenses, which we needed to communicate with our priests in the interior; He would even antagonize the Catholic Church by praising Evangelicals (Protestants). He gave Evangelical ministers use of the stadium for their rallies at no charge."

In January 1977, the Capuchin mission of 33 American priests issued a denunciation of atrocities committed by Somoza's national guard. The Capuchins documented the persectuion of peasants by the national guard, which was waging an unsuccessful campaign against Sandinista guerrillas in the mountains and jungles of the country's eastern interior. The Capuchins estimated that 3,000 to 4,000 peasants, including women and children, had been slaughtered by Somoza's troops between 1974 and 1976.

"There were only a few Sandinistas in the mountains at the time," Schmitz said."The national guard took over village chapels, brought the people in and tortured them for information. They actually converted the chapels into military headquarters. Fifteen lay pastors were killed. Once they killed 29 children in a village after the Sandinistas made a successful raid on national guard troops. The killing of the children was a reprisal, an overreaction by the national guard."

Schmitz said that Somoza was largely to blame for turning the church and the people against his government. He overreacted to anything he suspected was opposition, the priest said.

"When Sandinistas took over a town, young people would go with them" when they left, he said, "They were afraid of being murdered by the national guard."

A Maryknoll nun, Sister Julie Ann, who works in Managua's slums, defended the taking up of arms. "A Christian cannot remain neutral in the reality of a dictatorship like this," she said.

"We were gassed out of the churches by the national guard. I was rifle-butted by them when I tried to prevent them from taking children and beating them. I was arrested and harassed.

"More and more, the church is speaking out for justice in Latin America. You can't stand by and see people beaten in front of you. Somoza considered us subversive for trying to organize people in the slums, trying to help them improve their conditions. It was even subversive of us to ask for water when it was cut off during the war."

"No one would think now that the fight against Hitler was not a jus-fight," said Cardenal, who helped raise money for the Sandinistas. "Somoza was the same as Hitler. It is a traditional principle of the church that there can be a just war in the legitimate defense of the people against an oppressive regime,"