The church and state in Mozambique, close allies in colonial times and thus estranged after independence, appear to be on the verge of an open confrontation.

The crisis, brewing since early November, suddenly has surfaced with the forced closing of 15 Catholic mission churches, one Nazarene and three Presbyterian churches and the Anglican cathedral in Gaza Province just north of the capital two weeks ago.

Catholic bishops, in a letter to the government, have complained about the closings as well as the recent confinement of all missionaries in northernmost Cabo Delgado Province to the coastal town of Pemba.

The Catholic hierarchy seems to fear that freedom of religion, guaranteed by the constitution, is seriously threatened. But officials of the ruling Frelimo party say this is nonsense and that the real issue is the refusal of the powerful Catholic church to redefine its once privileged role to fit into an independent, Marxist-oriented Mozambique.

"I hope we can find a modus vivendi with the party," said Catholic Archbishop Alexandre dos Santos in an interview at his residence." I don't think they will go so far as to close down the church altogether."

"What the church has to do," said a Frelimo official, "is to decolonize itself and adjust to the new realities of Mozambique."

Under Portuguese colonial rule, the Catholic church was an extremely powerful political institution with a membership of 1.6 million. It also ran most of the schools and hospitals available to the African population in the countryside, giving it additional influence there.

Frelimo partisans who led the struggle for Mozambique's independence, achieved in 1975, found the Catholic church and colonial government together in their staunch opposition to the nationalist cause. They have never forgiven the Catholic church for this and Frelimo's Marxist leaders are now squaring off against it on ideological grounds.

In addition to the large Catholic following, there are said to be 1 million Moslems and 500,000 Protestants out of a total population of around 12 million.

The Catholic churches closed by Frelimo in January Were all located on large mission stations that include schools, hospitals and living quarters for the clerics. There are scores of these stations throughout the country and Catholic authorities say it is likely that most will be closed shortly.

A priest from one of the affected churches in Gaza Province said local party officials had forbidden him to hold services under the trees or in private residences. They had also told him permission would only be granted to build a new church miles from the present site, he said.

One top Frelimo party official said, however there was no intention of outlawing worship under the trees and that the crackdown was limited to those churches located on mission sites where the state had already taken over schools and hospitals.

The situation is confused. While some missionaries are being imprisoned or expelled on charges of immoral conduct, others are being granted visas to come work here.

The confrontation began last November with a blistering attack by President Samora Machel on the role of the Catholic establishment and other religious groups in colonial times.

"The cross was never a weapon of the people. It was a colonial weapon. The cross blessed the whip of the administrator, the cannons of the colonial army and the planes that bombarded our people with napalm and destroyed our crops," he said in a speech to the nation.

"With the party, we are going to unmask religion and all other forms of obscurantism. What is religion for, to misdirect us? What are churches for, to divide us?" he asked. "Our faith went to Rome, Mecca or England. It did not stay in Mozambique to fight colonialism.

"Religion," he concluded, "rejects light. It is an eternal night, without stars or moon."

Machel's outburst followed the party's discovery according to Frelimo officials that the Catholic church was actively organizing to oppose it and attempting in some instances to infiltrate local party cells.

The church was not long. in responding. On Dec. 6, the nine Catholic bishops presented Frelimo with 21 grievances. The letter has not yet been made public but Catholic sources say their complaints concerned violation of human rights and lack of freedom of speech and religion.

Frelimo officials countered with charges of misbehavior by priests and missionaries. On Dec. 7, they say, the government was obliged to expel a Dutch priest, Gerald Van Der Heijden, who was accused of homosexual assault against a child in Cabo Delgado Province.

This apparently provoked the recall of all missionaries working in the province to Pemba, where they have been confined pending a national party decision on their activities there and elsewhere in Mozambique.

A second complaint related by party officials is that one Pentacostal missionary group had actually drowned several persons in the process of baptizing them in the sea.

A third is that many priests have secretly fathered children without taking responsibility for them and leaving Mozambican mothers to bring them up.

"We both have our list of grievances," remarked one top Frelimo officials, "but the fundamental problem is that the church simply has not found its proper role in our new society."