MEXICO CITY — It was the third hearing in one of Mexico’s biggest corruption cases in years, but the general accused of abetting billions of dollars in oil theft was nowhere to be seen.

Judge Angélica Lucio Rosales looked out at the crowd of lawyers and family members in the federal courtroom, unimpressed.

“Where is General Trauwitz?” she asked.

When Eduardo León Trauwitz, 53, missed the previous hearing, his lawyers said he was in the hospital. This time, they said, he was out of the country.

In a case that has come to be seen as a test of Mexico’s ability to crack down on corruption, it was a remarkable illustration of the challenges ahead: Even getting the accused to appear in court is not easy.

President Andrés Manuel López Obrador galvanized Mexico’s electorate last year in part by railing against corruption. He argued that Mexicans should be furious that their government — a “mafia of power,” he said — was stealing from them.

López Obrador, known here as AMLO, had no shortage of examples. Mexico is the most corrupt country in the Group of 20, according to Transparency International, and bribes, kickbacks and outright theft have pervaded the government for decades. In many cases, government officials and security personnel have been accused of accepting bribes from criminal organizations.

That’s a growing concern in a country where the government is unable or unwilling to exert authority over much of its territory — as in the northern state of Sonora, where nine American Mormon women and children were gunned down in broad daylight last week.

One of the major questions of López Obrador’s presidency was if and how he would pursue former officials for corruption. Doing so would be well received by his supporters, and by the United States and other governments. But it would threaten fragile alliances between López Obrador and some of the country’s most powerful men and women.

Then there was the other problem: Was an anti-corruption campaign in a judicial system as flawed as Mexico’s even possible?

“AMLO has to be very careful about how he goes after corruption,” said University of San Diego political scientist David Shirk, who studies Mexico’s judicial system. Graft “is so pervasive and entrenched in Mexico’s power elite that if he probes too deeply among powerful individuals, there’s certain to be a backlash.”

The case against Trauwitz, a former director of security for the state oil company, Pemex, is among a handful of indictments at the heart of López Obrador’s anti-corruption drive. Former Pemex employees say Trauwitz coordinated a vast effort to pillage oil from pipelines and refineries. Annually, oil theft costs Pemex roughly $3.5 billion.

Trauwitz is not the only former Pemex official wanted by López Obrador. Emilio Lozoya, the former head of the company, is accused of accepting millions in bribes through shell deals. Lozoya, like Trauwitz, has vanished. The men have something else in common: They were both top aides to former president Enrique Peña Nieto, López Obrador’s predecessor, who could become entangled in their cases if they were to proceed.

Lawyers for Trauwitz and Lozoya say the charges against them are baseless, and they are intentionally evading warrants they believe are politically motivated.

“The accusations are false,” Roberto García González, Trauwitz’s attorney, told The Washington Post. He said Trauwitz fought oil theft, and his effort is being misrepresented by the López Obrador administration.

López Obrador has taken special aim at Pemex, the company he came of age protesting as a young activist. The government depends on Pemex for around 15 percent of its tax revenue. López Obrador has argued that the faltering company can be restored to health by reducing fuel theft and corruption.

That approach leads directly to the Trauwitz case. Only a few months ago, it seemed an explosive symbol of the new anti-corruption drive. Now it appears to reveal the judiciary’s failure to deliver on the president’s top priority.

“We are not going to let them keep pillaging,” López Obrador told reporters this month.

But the case was a mess. Not only is Trauwitz still at large, but the government’s case appears to hinge on testimony that offers little evidence of a vast conspiracy.

In 2010, Trauwitz was named head of security for Peña Nieto, then the governor of the State of Mexico. About a year after Peña Nieto won the presidency in 2012, Trauwitz received a new assignment: security chief at Pemex.

It was a plum job, one of the most senior positions in Mexico’s armed forces. Colleagues referred to him as a “general de dedo,” or “general of the finger” — a man who had been given a privileged rank by the finger of power.

When he took the position in early 2013, Pemex recorded 186 pipeline thefts. In 2017, his last year in the position, the number was 10,363, worth more than a billion dollars a year.

In March 2017, a whistleblower named Moises Merlin, a Pemex security officer, filed an internal complaint against Trauwitz, accusing him of issuing orders that were “illegal and illicit,” including concealing evidence of oil theft in pipelines across the country. Under Peña Nieto, the complaint was shelved.

After leaving Pemex, Trauwitz offered himself as an expert on stopping oil theft.

“We have identified the leaders of oil theft, but they continue to steal,” he reported in a paper last year to the Mexican Society of Geography and Statistics. “Nobody does anything to detain them.”

“It was a strange speech,” said a member of the Society of Geography and Statistics, who spoke on the condition of anonymity out of concern for becoming entangled in the case. “Like this guy was giving a lecture on something he didn’t understand.”

Meanwhile, a growing number of Pemex employees said it was Trauwitz who had failed to investigate those responsible for oil theft and appeared to be profiting off the crime.

Merlin, in his initial complaint and in later testimony, said Trauwitz’s team assigned poorly equipped, untrained workers to conceal pipelines that had been broken into. Trauwitz and his colleagues, Merlin said, instructed the security team not to report those intrusions to Mexico’s judiciary, as required by law. Merlin also said he was ordered by officers below Trauwitz to drill into the pipelines himself, where oil could later be extracted illegally.

In some cases, ordinary Mexicans swarmed to collect oil in buckets. At one such theft, in Hidalgo state in January, the pipeline exploded, killing 137.

Merlin said officers including Trauwitz “prohibited the workers from informing other authorities under the threat of firing them and threatening to make them look like they were the ones stealing oil.”

Trauwitz’s lawyers contest that allegation.

“In the investigation, there are thousands of notes that show that legal notice was given by Pemex, and what was being done is to combat the theft of oil,” García González said.

Merlin and at least three other former employees now allege a vast coverup at Pemex, with Trauwitz at the top. But none say they received direct orders from him to steal oil, and none have any proof of Trauwitz’s alleged connections to the cartels that were siphoning off oil and selling it on the black market.

Former Pemex employee Mario Ogazón Viamonté wrote in a statement to the attorney general’s office that Trauwitz’s team did not seem interested in stopping oil theft, but enabling it. Ogazón told The Washington Post he confronted Trauwitz, but Trauwitz shrugged him off.

Merlin’s initial complaint resurfaced not long after López Obrador took office in December 2018. The president had announced he would dismantle the oil theft networks.

A journalist asked López Obrador about Trauwitz at a January news conference. López Obrador grinned.

“Raise your hand if you know of this man,” he asked the journalists. Only one did.

“Well, he exists,” López Obrador said. “He’s on a list of people being investigated.”

Trauwitz’s lawyers soon received a court summons. So did 20 other Pemex officials who worked for him. Trauwitz attended his first hearing in April, wearing a military uniform glittering with medals.

It was an image López Obrador supporters had clamored for: a uniformed official, paying the price for corruption.

“The Final Hours of General Trauwitz,” the Mexican newspaper El Universal pronounced.

But at the second hearing, in April, Trauwitz was nowhere to be seen. His lawyers cited health problems. To the third hearing, his lawyers brought a doctor’s note, written in English. Court employees shook their heads and snickered.

Trauwitz’s lawyers applied for an injunction and got it, allowing him to remain free. His bank accounts were frozen, but then promptly unfrozen.

In June, the attorney general’s office escalated the prosecution, publishing an arrest warrant for Trauwitz on a charge of organized crime. If convicted, he could be sentenced to 80 years.

But the warrant was suspended by another judge. That is when Trauwitz vanished. By the time the warrant was enacted again, he was outside of Mexico; his lawyers will not say where.

They told The Post that Trauwitz’s absence was now part of a strategy.

“Knowing the existence of an arrest warrant for organized crime, which would mean staying in prison for the duration of the process, the legal strategy is to combat it through an injunction, for which it is necessary not to execute the arrest warrant,” García González said.

In July, the attorney general’s office announced it had asked for Interpol’s help in finding Trauwitz and bringing him back. But Trauwitz’s name is still not on Interpol’s online list of wanted people. Interpol would not comment on why his name does not appear, or if that means he is not currently wanted.

The attorney general’s office would not comment on the Trauwitz case.

Mexico’s judicial system has undergone a dramatic transformation since 2008, when it established an open-trial, adversarial process modeled on the U.S. system. But despite those reforms, the country has rarely waged high-level anti-corruption prosecutions successfully. One early error in the Trauwitz case, analysts said, was not detaining him when the trial began.

“The case is a failure. It’s proof that corruption is still being tolerated, that it’s still being covered up,” said Roberto Rock, a columnist for El Universal. “Now we can see that fight against corruption is just rhetoric.”

Six of Trauwitz’s employees at Pemex are in jail as their cases go through the courts. They include Brig. Gen. Socrates Herrera, one of his top deputies. Their lawyers, too, say there is no evidence against their clients. Verdicts are expected this year.

But Trauwitz is still missing.

“López Obrador used Trauwitz as a symbol of corruption and of oil theft,” Rock said. “But here we see just how hard it will be in Mexico for that to result in any kind of legal action.”

Gabriela Martínez contributed to this report.