A quarter of a century ago, a Roman Catholic priest founded a cultural studies institute here that was to be the base for a kind of religiously inspired Latin American peace corps.

To finance his unorthodox project, the churchman, Ivan Illich, hit on a novel scheme to earn precious dollars: he invited U.S. citizens to come to this Mexican garden spot and learn Spanish.

Thousands of Americans took up the offer, and for nearly two decades, Illich's institute survived, stirring ecclesiastical controversy as a center not only for research on Latin American problems but also for courses on cultural sensitivity for Third World clergymen, many of whom were intent on somehow "debureaucratizing" the church.

Illich, 59, an Austrian-born naturalized American, surrendered his clerical collar in 1969 and has withdrawn to a contemplative life in the secluded village of Ahuatepec, a few miles northeast of here.THE LANGUAGE program he began as an ancillary part of his now defunct center has spawned a virtual cottage industry of Spanish instruction schools that still cater predominantly to U.S. citizens.

Amid the walled splendor of the hidden estates that have given this city its international reputation as an enchanting retreat, tongue-tied northerners practice the rolling rr's and melodic cadence of Spanish.

Most students end up living not in lavish homes but middle-class dwellings, with families that keep the conversation going in Spanish long after school adjourns in the early afternoon.

Such opportunities for total immersion are the main selling point of the dozen or so schools that vie for foreign clients.

Draw a family tree of the schools here today and the most prominent ones will lead back to Illich. A number of the instructors who taught at his center subsequently split from him -- some did so in a salary dispute -- to set up their own programs.

In contrast to Illich's broad aim of altering church and society, the purpose of the more recent breed of Cuernavaca institutes is limited to helping foreigners master Spanish -- and enjoy Mexico.

Some schools offer lectures on Latin American history, culture and government alongside complete courses on grammar. But the seminars are decidedly nonpolitical.ILLICH SURFACED briefly in June to give the Mexico City daily Excelsior a lengthy interview. The newspaper said it was the first by the philosopher-historian in 18 years.

A tall, gaunt figure described as having penetrating eyes and an agile mind, Illich seemed to be his old critical self. In a two-hour conversation, he called the Catholic Church just "one more international theater," condemned modern weapons as "instruments of genocide," lamented the growing threat of world pollution and appeared generally scornful of U.S. foreign policy under the Reagan administration.

He expressed pride in the 14,000 volumes he and an associate donated to a Mexican college, comprising studies of religious and cultural life in Latin America produced by his former Intercultural Center of Documentation (known by its Spanish acronym, CIDOC). But he made no mention of the language schools that sprouted after his, and the interview seemed to attract little notice among those carrying on one of the traditions he began.

"He never really related to us," recalled Santiago Olalde, 41, a former CIDOC language instructor who manages El Centro Bilingue. "He moved in other circles. His aims were different than ours are today. For him, language instruction was secondary. For us, it's the most important. If you want to learn Spanish, this is the place to come."