When Pope John Paul II celebrates a mass in Mexico City's Aztec Stadium, as he plans to do later this month, he will violate the Mexican constitution on several counts.

Police could fine the Roman pontiff, because it is illegal for a non-Mexican to celebrate a mass and for a mass to be celebrated outside a church. The Mexican state would even have the right to confiscate the giant, privately owned soccer stadium.

No one believes this will happen, of course, but it illustrates the irony of the pope's choosing for his first papal journey abroad a country that has one of the largest Roman Catholic populations in the world but nevertheless is officially anticlerical. For more than a century, Mexico has refused to have diplomatic relations with the Vatican.

The Pope is traveling to such apparently hostile territory to inaugurate the third Latin American Bishops' Conference on Jan. 26. The 17-day meeting of the church hierarchy will chart the church's social and political role in this overwhelmingly Catholic region for the next decade. The new, activist pope, according to church leaders, is determined to set the tone of this crucial meeting.

The fact that this involves his stepping on Mexican soil has caused much controversy here.

"You'd think the visitor was the Spanish conqueror Cortez," one observer said.

The reason for the current intense debate is that although 90 percent of Mexico's population is Catholic and many are deeply devout, the history of the church-state conflict here is longer and bloodier than that of any other country on this continent.

There is widespread speculation here that the pope's presence may revive the conflict.

Ferocious religious persecution began during the 19th century liberal reform when the reactionary, Spanish-dominated church schemed against the republican government that had finally fought off the Spanish conquerors. Another anticlerical wave, provoked by church opposition to the 1910 revolution, caused the church hierarchy to declare an unrecedented strike that lasted three years.

Only in the late 1930s, after the notorious "Cristero wars," did years of bitter, bloody fighting between Catholic guerrillas and officially backed terrorists come to an end.

Today the constitution still forbids priests to wear clerical garb, toll church bells, organize processions or teach religion in schools, although these laws are often only loosely enforced. Yet, stripped of all its wealth and despite these restrictions, the church still has immense influence and is the only national organization outside the government's control.

The planned arrival of the pope, therefore, has set off intense political discussion, with heated polemics in the press and awkward statements from uncomfortable government officials.

"I wish the pope would perform a miracle and not come to Mexico," a harassed presidential aide sighed a few days ago.

As the first rumors started coming from Rome, the government went on the defensive and officials repeated: No, the pope had not been invited to Mexico. Newspaper headlines added to the discomfort by blurting: "With or Without Visa, John Paul II Will Come."

A Foreign Ministry official produced a statement saying: "The pope has made no request for a visa. If he files an application, it will be handled like that of any other tourist."

When the visit was confirmed, the embarrassed government made a turn-about. Although Mexican President Jose Lopez Portillo told reporters last week that diplomatic relations with the Vatican would not be reestablished, he will meet privately with the pontiff.

The Foreign Ministry, in turn, has cabled thorough instructions to its European embassies and consulates to issue John Paul II a "distinguished visitor's visa" should the Vatican apply.

Officials now hope that the pope's reported homework on the touchy situation here will prevent him from making any inadvertent remarks that might set off an anticlerical reaction. But a deeper worry in government and liberal circles is the scramble for political mileage that has already begun.

The pope, they know, can draw the massive crowds which the government can only get by trucking people in. The question is, who will capitalize on this.

In this country, where politics has long been the government's domain, there are numerous civic groups that act as lobbies, many made up of conservatives operating under the auspices of the conservative bishops.

Despite Pope John Paul's progressive image, conservative groups are placing advertisements welcoming the pope as a way of making propaganda for themselves.

Businessmen's groups, clamoring for an audience with the pope, have offered whatever resources the church will require in the coming weeks.

A strange new bedfellow for these conservatives is the recently legalized Mexican Communist Party, which has also announced it will prepare a public welcome for the pope. This will give the Communists a chance to make gains at the expense of the government party which has to remain silent because of the country's anticlerical laws.

For a further whiff of intrigue, the pontiff's presence will inevitably affect a deepening conflict within the Mexican church. The majority of conservative bishops has been campaigning against the small group of progressives to the point of creating a split within the hierarchy.

Last year the conservatives tried to get the Vatican to dump Mexico's most controversial figure, the outspoken and popular bishop of Cuernavaca, Sergio Mendez Arceo. The conservatives lost that round. On his recent visit to Rome, Mendez Arceo was given full papal support and told to stay.

Now the different Catholic and conservative cities in Mexico are competing for a visit and preferably a papal mass. Puebla, the beautiful Spanish colonial town and the site of the bishop's conference, is obviously on the list, and Guadalajara and Oaxaca are strong possibilities. The pope may even see an Indian community and a rodeo.

Whatever the outcome of the bishop's conference, his visit will excite many Mexicans. A cartoon in a local paper captured the Mexican paradox well. It showed a bureaucrat publicly criticizing the pope's visit, but privately -- clutching his rosary -- jumping for joy.