Jose Luis Gonzalez, the principal of a local middle school, received an unusual letter from a group of ninth-graders last semester. "Our teacher doesn't show up to class," the children wrote, begging him to replace their math instructor.

But Gonzalez said he was powerless to take action even though the teacher, Carlos Ignacio Loyda, was working another job and missed up to three-quarters of his classes some months. Loyda's position was protected by Mexico's powerful teachers union, Gonzalez said.

"It hurts the children," said Gonzalez, 55, a wiry, soft-spoken man who was a teacher for 17 years. Union clout protects teachers who don't "fulfill their obligations," he said. No-show teachers are such a huge problem that the state education department has printed posters reminding teachers that "attendance is essential."

A report by the World Economic Forum ranked the quality of education in Mexico 74th out of 102 nations surveyed, just behind Cameroon. The country's dismal marks contribute to lives of closed opportunities. Half of Mexico's population is trapped in poverty, illiteracy is endemic in rural areas, and the average child abandons school at 14. Success for millions of Mexicans means sneaking into the United States to mow lawns or pick apples.

Many Mexicans blame their teachers, or more precisely the National Education Workers Union, which represents 1.3 million educators. The trade union, the largest in Latin America, has created what critics describe as a monstrous system of perks and patronage, including a practice that allows teaching positions to be inherited and sold for cash.

"It is a corrosive power," said Carlos Ornelas, an education scholar who has written extensively about the union. He said the organization's might is behind the particularly short elementary school day -- only four hours of instruction -- and the lack of public information about how individual schools are performing. The union also holds veto power over a curriculum that is handed down from generation to generation.

Rafael Ochoa Guzman, the union's secretary general, defended the union and blamed poor educational performance on the federal government. "There is not just one cause that leads to our educational situation, but a mix of several factors: the funding of education, the lack of technology to help with learning, the low salaries of the teachers, the infrastructure," he said in an interview. "School buildings are in deplorable condition."

The relationship between the teachers union and the federal government has long been one of the commanding dramas of Mexican politics. During the 71-year rule of the Institutional Revolutionary Party, or PRI, the union guaranteed the ruling party votes in exchange for a controlling interest in the education system. Although Mexico is more open since President Vicente Fox defeated the PRI in 2000, the union is a powerful legacy of an authoritarian past.

The union's president, Elba Esther Gordillo, is a federal congresswoman who headed the PRI in Congress until she was voted out of her leadership post in December. Gordillo, a major power broker in the country, declined requests for interviews.

Leticia Barba Martin, a professor at the National Autonomous University of Mexico who ran a teachers college for 20 years, said the union "is a political force more than anything. It hurts education because it creates inertia and traditions that don't permit necessary changes."

A Long-Standing Custom

Josefa Hernandez, an energetic college graduate in the southern Mexican state of Puebla, said she had been unable for four years to land a teaching job through applications to state education officials. Finally, she said, a local school supervisor who belongs to the union told her he knew a teacher who had died, and offered to "work it out with the husband."

By long-standing custom in Mexico, a deceased teacher's children have first right of refusal for the job. If they don't want it, the surviving spouse often sells the position for thousands of dollars. Though the practice is illegal, it is common and often arranged by union leaders, according to two dozen interviews with teachers and education officials.

Hernandez said she paid $5,000 to the man, who initially demanded $8,000 for his late wife's job.

"At least I was able to bargain him down," said Hernandez, 29, who added that she thought the practice of selling jobs interfered with attracting the best teachers.

Several other teachers also described similar practices involving hiring and placement. They said local union leaders also sometimes take a cut when they sell a teacher's job, much like a real estate agent does when matching buyers and sellers.

Teachers are not particularly well paid; they receive $500 to $700 a month depending on years of service. But the jobs are sought after because the pay comes year-round for a school year of 200 days, with good medical benefits, year-end bonuses, the flexibility to hold other jobs and the resale value of the teaching position.

Ochoa Guzman, the union leader, said the union did not sanction the sale of jobs and had urged teachers to report the practice. He recalled being shocked when he saw a newspaper advertisement offering to sell a teaching position to the highest bidder. "It was so bold," he said. "Anyone who saw the newspaper could imagine that it's legal or authorized, when it is not."

Sylvia Schmelkes, a top Education Ministry official in the Fox administration, was blunt: "The union is a business for selling jobs. The inherited jobs open the possibility that those who get them are not good teachers."

Classroom as Sacred Niche

The union is currently opposing a major overhaul of the middle school curriculum. Lorenzo Gomez-Morin Fuentes, assistant secretary of education, said the curriculum was established more than 80 years ago and desperately needed modernizing. The change was intended to focus on teaching fewer subjects in more depth, he said, to prepare students "according to the needs of this century."

But the union has objected to the proposed curriculum change, saying it was done "unilaterally." Many observers said that the union rejection meant it could probably use its political clout to kill the initiative.

Analysts noted that while top Education Ministry officials come and go with changing administrations, the union's leadership and vast network of connections remain more constant. Atanasio Garcia Duran, a union leader in Veracruz and a rare internal critic, said the union's power comes from "a network of complicity" that developed during the PRI era between union officials and state and federal education officials. Principals, area supervisors and school inspectors frequently do not report teacher problems, he said.

Gomez-Morin, the Fox administration official, said that during the PRI era a "very closed" education system developed. One thing the Fox administration is trying to do is open up classrooms to parents, he said, but the union is "uncomfortable with parents watching."

Daniel Dominguez Aguilar, the leader of a small independent union at a teachers college in Jalapa, in Veracruz state, said, "The classroom has historically been the sacred niche of the teacher." And that has thwarted efforts to evaluate teachers in the classroom and to do research on how often teachers are absent or tardy, he said.

Internal Divisions

Many union members said their union is in transition, if not crisis, trying to find its way in a more democratic era. They said some factions are open to reform and transparency, while others cling desperately to the old ways.

But during visits to a dozen schools over the past two years, the union's power was evident in the fears expressed by its members. Public criticism of the union would be professional suicide, many said. Some even spoke in hushed tones and behind closed doors before criticizing the union.

At the middle school where Gonzalez is principal, in this city of 160,000 in Veracruz state, few in the yellow brick schoolhouse, the Technical Secondary School No. 75, were willing to discuss the power of the union. But Gonzalez, who is also a union member, ultimately agreed that the public had a right to know what was going on in the public schools.

Gonzalez said parents and students were so fed up with all the classes missed by Loyda, the math teacher, that they complained to the local newspaper, which published a story earlier this year, bringing rare attention to the absentee issue.

Gonzalez sent a letter to state education officials, outlining the problems with Loyda, which resulted in an undisclosed "economic sanction" against the teacher. Gonzalez said parents didn't believe he would send a letter that complained about a fellow union member. "But I felt it was the right thing to do," Gonzalez said. "Things are changing, but slowly."

Loyda referred all questions to his union representative, Roberto Fonseca, who called the issue "private" and declined to comment.

One of the students in the math class, Mario Alberto Vazquez, 15, and his mother, Maria Candelaria Zaino, said they didn't see the lost semester as a private issue. Zaino, who never learned to read and write, said public school was the only way her son could get ahead. The union "allowed a teacher not to fulfill their duties," which hurt Mario, who hopes to be an engineer, his mother said.

"We have a right to learn," Mario said.

Researcher Bart Beeson in Mexico City contributed to this report.

Josefa Hernandez said she purchased her fifth-grade teaching position at a Puebla public school for $5,000 from the widower of her predecessor.