The battle for the loyalties of Nicaragua's Catholics has taken on new dimensions in recent weeks with two priests playing the principal roles, one a Sandinista government official and the other the country's new cardinal who is a critic of the Sandinistas.

Cardinal Miguel Obando y Bravo was mobbed by tens of thousands of Catholics today in this Spanish colonial city about 30 miles south of Managua where he came to say mass on his first trip outside the capital since he was made a cardinal on May 25.

Meanwhile, Sandinista Foreign Minister Miguel d'Escoto, 52, a suspended Maryknoll priest, today completed one week of a hunger strike in protest of U.S. support for anti-Sandinista rebels, or what he called "the policy of state terrorism imposed by the U.S. government against Nicaragua."

D'Escoto's "prolonged fast" against Reagan administration policies has made him a symbol around whom Sandinista supporters, including progovernment clergy and other Catholics, are rallying. D'Escoto has said he will not speak to journalists during his fast.

But Cardinal Obando y Bravo, in his first interview since he returned to Nicaragua, suggested that he does not think much of d'Escoto's fast and seemed to question the motives of the priest-politician. The cardinal read from the Gospel according to Matthew: "When you fast, don't be like the hypocrites who put on a sad countenance, for they make faces so that other men will know they are fasting."

Asked if he considered d'Escoto's position hypocritical, he pointed out that while the foreign minister is fasting for peace "the war is continuing and the government is still sending young men to fight and to be in the Patriotic Military Service," which is the Nicaraguan military draft.

He repeated a position he has taken before: that there should be a "national reconciliation" involving peace negotiations with U.S.-supported rebels. The Sandinistas have insisted that the rebels are "mercenaries" organized and armed by the United States and have refused to talk to them.

In the interview last week, Obando y Bravo, 59, said he hopes for better relations between Nicaragua and the United States, in part because the United States might help Nicaragua overcome its economic problems. But he also said that "neither capitalism nor communism is the answer for Nicaragua, but a path between the two."

"In honesty it can't be said that this is a totalitarian government," he said, but it is a government that has taken steps toward totalitarianism."

"I also see some good things in Marxism," Obando y Bravo said. "I am sure there are Sandinistas who are good Catholics." But he said he was convinced some Sandinistas had embraced Marxist-Leninist ideology to an extreme "and have become filled with hate. They believe the end justifies the means . . . . When a person thinks that way, he is no longer a Christian."

The new cardinal also expressed concern over what he said were the interests in his country of "the great powers," particularly the Soviet Union, which has built strong ties to the Sandinista government. "It seems to me that the Soviet Union is trying to corral the United States," he said, with Nicaragua as one of the fence posts.

D'Escoto was suspended from the priesthood by the Vatican last March when he refused to adhere to new church statutes promoted by Pope John Paul II that prohibit priests from holding government office. D'Escoto said at the time that he considered the Vatican action "politically motivated" and characterized the pope as a political conservative taking measures against leftist clergymen.

D'Escoto is spending his fast on the grounds of a church in a poor neighborhood in Managua and mostly in a small room furnished with a bed, a rocking chair, small religious paintings on a makeshift shrine, a photograph of the late Martin Luther King Jr. and posters.

According to doctors here, he consumes water, vitamins and mineral salts but no solid food. He receives visits from Sandinista supporters, including delegations of market vendors, artists, soldiers and, Friday night, a candlelight procession that left his church and made its way to the U.S. Embassy.

Although d'Escoto has made it clear that he will not fast until death, there are daily briefings for journalists about the state of his health and bulletins on state radio. Martin Luther King Jr. and posters.

According to doctors here, he consumes water, vitamins and mineral salts but no solid food. He receives visits from Sandinista supporters, including delegations of market vendors, artists, soldiers and, Friday night, a candlelight procession that left his church and made its way to the U.S. Embassy.

Although d'Escoto has made it clear that he will not fast until death, there are daily briefings for journalists about the state of his health and bulletins on state radio.