MEXICO CITY — In September 2005, a senior Wal-Mart lawyer received an alarming e-mail from a former executive at the company’s largest foreign subsidiary, Wal-Mart de Mexico. In the e-mail and follow-up conversations, the former executive described how Wal-Mart de Mexico had orchestrated a campaign of bribery to win market dominance. In its rush to build stores, he said, the company had paid bribes to obtain permits in virtually every corner of the country.

The former executive gave names, dates and bribe amounts. He knew so much, he explained, because for years he had been the lawyer in charge of obtaining construction permits for Wal-Mart de Mexico.

Wal-Mart dispatched investigators to Mexico City, and within days they unearthed evidence of widespread bribery. They found a paper trail of hundreds of suspect payments totaling more than $24 million. They also found documents showing that Wal-Mart de Mexico’s top executives not only knew about the payments, but had taken steps to conceal them from Wal-Mart’s headquarters in Bentonville, Ark. In a confidential report to his superiors, Wal-Mart’s lead investigator, a former F.B.I. special agent, summed up their initial findings this way: “There is reasonable suspicion to believe that Mexican and USA laws have been violated.”

The lead investigator recommended that Wal-Mart expand the investigation.

Instead, an examination by The New York Times found, Wal-Mart’s leaders shut it down.

Neither American nor Mexican law enforcement officials were notified. None of Wal-Mart de Mexico’s leaders were disciplined. Indeed, its chief executive, Eduardo Castro-Wright, identified by the former executive as the driving force behind years of bribery, was promoted to vice chairman of Wal-Mart in 2008. Until this article, the allegations and Wal-Mart’s investigation had never been publicly disclosed.

But The Times’s examination uncovered a prolonged struggle at the highest levels of Wal-Mart, a struggle that pitted the company’s much publicized commitment to the highest moral and ethical standards against its relentless pursuit of growth.

Under fire from labor critics, worried about press leaks and facing a sagging stock price, Wal-Mart’s leaders recognized that the allegations could have devastating consequences, documents and interviews show. Wal-Mart de Mexico was the company’s brightest success story, pitched to investors as a model for future growth. (Today, one in five Wal-Mart stores is in Mexico.) Confronted with evidence of corruption in Mexico, top Wal-Mart executives focused more on damage control than on rooting out wrongdoing.

In one meeting where the bribery case was discussed, H. Lee Scott Jr., then Wal-Mart’s chief executive, rebuked internal investigators for being overly aggressive. Days later, records show, Wal-Mart’s top lawyer arranged to ship the internal investigators’ files on the case to Mexico City. Primary responsibility for the investigation was then given to the general counsel of Wal-Mart de Mexico — a remarkable choice since the same general counsel was alleged to have authorized bribes.

The general counsel promptly exonerated his fellow Wal-Mart de Mexico executives.

When Wal-Mart’s director of corporate investigations — a former top F.B.I. official — read the general counsel’s report, his appraisal was scathing. “Truly lacking,” he wrote in an e-mail to his boss.

The report was nonetheless accepted by Wal-Mart’s leaders as the last word on the matter.

In December, after learning of The Times’s reporting in Mexico, Wal-Mart informed the Justice Department that it had begun an internal investigation into possible violations of the Foreign Corrupt Practices Act, a federal law that makes it a crime for American corporations and their subsidiaries to bribe foreign officials. Wal-Mart said the company had learned of possible problems with how it obtained permits, but stressed that the issues were limited to “discrete” cases.

“We do not believe that these matters will have a material adverse effect on our business,” the company said in a filing with the Securities and Exchange Commission.

But The Times’s examination found credible evidence that bribery played a persistent and significant role in Wal-Mart’s rapid growth in Mexico, where Wal-Mart now employs 209,000 people, making it the country’s largest private employer.

A Wal-Mart spokesman confirmed that the company’s Mexico operations — and its handling of the 2005 case — were now a major focus of its inquiry.

“If these allegations are true, it is not a reflection of who we are or what we stand for,” the spokesman, David W. Tovar, said. “We are deeply concerned by these allegations and are working aggressively to determine what happened.”

In the meantime, Mr. Tovar said, Wal-Mart is taking steps in Mexico to strengthen compliance with the Foreign Corrupt Practices Act. “We do not and will not tolerate noncompliance with F.C.P.A. anywhere or at any level of the company,” he said.

The Times laid out this article’s findings to Wal-Mart weeks ago. The company said it shared the findings with many of the executives named here, including Mr. Scott, now on Wal-Mart’s board, and Mr. Castro-Wright, who is retiring in July. Both men declined to comment, Mr. Tovar said.

The Times obtained hundreds of internal company documents tracing the evolution of Wal-Mart’s 2005 Mexico investigation. The documents show Wal-Mart’s leadership immediately recognized the seriousness of the allegations. Working in secrecy, a small group of executives, including several current members of Wal-Mart’s senior management, kept close tabs on the inquiry.

Michael T. Duke, Wal-Mart’s current chief executive, was also kept informed. At the time, Mr. Duke had just been put in charge of Wal-Mart International, making him responsible for all foreign subsidiaries. “You’ll want to read this,” a top Wal-Mart lawyer wrote in an Oct. 15, 2005, e-mail to Mr. Duke that gave a detailed description of the former executive’s allegations.

The Times examination included more than 15 hours of interviews with the former executive, Sergio Cicero Zapata, who resigned from Wal-Mart de Mexico in 2004 after nearly a decade in the company’s real estate department.

In the interviews, Mr. Cicero recounted how he had helped organize years of payoffs. He described personally dispatching two trusted outside lawyers to deliver envelopes of cash to government officials. They targeted mayors and city council members, obscure urban planners, low-level bureaucrats who issued permits — anyone with the power to thwart Wal-Mart’s growth. The bribes, he said, bought zoning approvals, reductions in environmental impact fees and the allegiance of neighborhood leaders.

He called it working “the dark side of the moon.”

The Times also reviewed thousands of government documents related to permit requests for stores across Mexico. The examination found many instances where permits were given within weeks or even days of Wal-Mart de Mexico’s payments to the two lawyers. Again and again, The Times found, legal and bureaucratic obstacles melted away after payments were made.

The Times conducted extensive interviews with participants in Wal-Mart’s investigation. They spoke on the condition that they not be identified discussing matters Wal-Mart has long shielded. These people said the investigation left little doubt Mr. Cicero’s allegations were credible. (“Not even a close call,” one person said.)

But, they said, the more investigators corroborated his assertions, the more resistance they encountered inside Wal-Mart. Some of it came from powerful executives implicated in the corruption, records and interviews show. Other top executives voiced concern about the possible legal and reputational harm.

In the end, people involved in the investigation said, Wal-Mart’s leaders found a bloodlessly bureaucratic way to bury the matter. But in handing the investigation off to one of its main targets, they disregarded the advice of one of Wal-Mart’s top lawyers, the same lawyer first contacted by Mr. Cicero.

“The wisdom of assigning any investigative role to management of the business unit being investigated escapes me,” Maritza I. Munich, then general counsel of Wal-Mart International, wrote in an e-mail to top Wal-Mart executives.

The investigation, she urged, should be completed using “professional, independent investigative resources.”

The Allegations Emerge

On Sept. 21, 2005, Mr. Cicero sent an e-mail to Ms. Munich telling her he had information about “irregularities” authorized “by the highest levels” at Wal-Mart de Mexico. “I hope to meet you soon,” he wrote.

Ms. Munich was familiar with the challenges of avoiding corruption in Latin America. Before joining Wal-Mart in 2003, she had spent 12 years in Mexico and elsewhere in Latin America as a lawyer for Procter & Gamble.

At Wal-Mart in 2004, she pushed the board to adopt a strict anticorruption policy that prohibited all employees from “offering anything of value to a government official on behalf of Wal-Mart.” It required every employee to report the first sign of corruption, and it bound Wal-Mart’s agents to the same exacting standards.

Ms. Munich reacted quickly to Mr. Cicero’s e-mail. Within days, she hired Juan Francisco Torres-Landa, a prominent Harvard-trained lawyer in Mexico City, to debrief Mr. Cicero. The two men met three times in October 2005, with Ms. Munich flying in from Bentonville for the third debriefing.

During hours of questioning, Mr. Torres-Landa’s notes show, Mr. Cicero described how Wal-Mart de Mexico had perfected the art of bribery, then hidden it all with fraudulent accounting. Mr. Cicero implicated many of Wal-Mart de Mexico’s leaders, including its board chairman, its general counsel, its chief auditor and its top real estate executive.

But the person most responsible, he told Mr. Torres-Landa, was the company’s ambitious chief executive, Eduardo Castro-Wright, a native of Ecuador who was recruited from Honeywell in 2001 to become Wal-Mart’s chief operating officer in Mexico.

Mr. Cicero said that while bribes were occasionally paid before Mr. Castro-Wright’s arrival, their use soared after Mr. Castro-Wright ascended to the top job in 2002. Mr. Cicero described how Wal-Mart de Mexico’s leaders had set “very aggressive growth goals,” which required opening new stores “in record times.” Wal-Mart de Mexico executives, he said, were under pressure to do “whatever was necessary” to obtain permits.

In an interview with The Times, Mr. Cicero said Mr. Castro-Wright had encouraged the payments for a specific strategic purpose. The idea, he said, was to build hundreds of new stores so fast that competitors would not have time to react. Bribes, he explained, accelerated growth. They got zoning maps changed. They made environmental objections vanish. Permits that typically took months to process magically materialized in days. “What we were buying was time,” he said.

Wal-Mart de Mexico’s stunning growth made Mr. Castro-Wright a rising star in Bentonville. In early 2005, when he was promoted to a senior position in the United States, Mr. Duke would cite his “outstanding results” in Mexico.

Mr. Cicero’s allegations were all the more startling because he implicated himself. He spent hours explaining to Mr. Torres-Landa the mechanics of how he had helped funnel bribes through trusted fixers, known as “gestores.”

Gestores (pronounced hes-TORE-ehs) are a fixture in Mexico’s byzantine bureaucracies, and some are entirely legitimate. Ordinary citizens routinely pay gestores to stand in line for them at the driver’s license office. Companies hire them as quasi-lobbyists to get things done as painlessly as possible.

But often gestores play starring roles in Mexico’s endless loop of public corruption scandals. They operate in the shadows, dangling payoffs to officials of every rank. It was this type of gestor that Wal-Mart de Mexico deployed, Mr. Cicero said.

Mr. Cicero told Mr. Torres-Landa it was his job to recruit the gestores. He worked closely with them, sharing strategies on whom to bribe. He also approved Wal-Mart de Mexico’s payments to the gestores. Each payment covered the bribe and the gestor’s fee, typically 6 percent of the bribe.

It was all carefully monitored through a system of secret codes known only to a handful of Wal-Mart de Mexico executives.

The gestores submitted invoices with brief, vaguely worded descriptions of their services. But the real story, Mr. Cicero said, was told in codes written on the invoices. The codes identified the specific “irregular act” performed, Mr. Cicero explained to Mr. Torres-Landa. One code, for example, indicated a bribe to speed up a permit. Others described bribes to obtain confidential information or eliminate fines.

Each month, Mr. Castro-Wright and other top Wal-Mart de Mexico executives “received a detailed schedule of all of the payments performed,” he said, according to the lawyer’s notes. Wal-Mart de Mexico then “purified” the bribes in accounting records as simple legal fees.

They also took care to keep Bentonville in the dark. “Dirty clothes are washed at home,” Mr. Cicero said.

Mr. Torres-Landa explored Mr. Cicero’s motives for coming forward.

Mr. Cicero said he resigned in September 2004 because he felt underappreciated. He described the “pressure and stress” of participating in years of corruption, of contending with “greedy” officials who jacked up bribe demands.

As he told The Times, “I thought I deserved a medal at least.”

The breaking point came in early 2004, when he was passed over for the job of general counsel of Wal-Mart de Mexico. This snub, Mr. Torres-Landa wrote, “generated significant anger with respect to the lack of recognition for his work.” Mr. Cicero said he began to assemble a record of bribes he had helped orchestrate to “protect him in case of any complaint or investigation,” Mr. Torres-Landa wrote.

“We did not detect on his part any express statement about wishing to sell the information,” the lawyer added.

According to people involved in Wal-Mart’s investigation, Mr. Cicero’s account of criminality at the top of Wal-Mart’s most important foreign subsidiary was impossible to dismiss. He had clearly been in a position to witness the events he described. Nor was this the first indication of corruption at Wal-Mart de Mexico under Mr. Castro-Wright. A confidential investigation, conducted for Wal-Mart in 2003 by Kroll Inc., a leading investigation firm, discovered that Wal-Mart de Mexico had systematically increased its sales by helping favored high-volume customers evade sales taxes.

A draft of Kroll’s report, obtained by The Times, concluded that top Wal-Mart de Mexico executives had failed to enforce their own anticorruption policies, ignored internal audits that raised red flags and even disregarded local press accounts asserting that Wal-Mart de Mexico was “carrying out a tax fraud.” (The company ultimately paid $34.3 million in back taxes.)

Wal-Mart then asked Kroll to evaluate Wal-Mart de Mexico’s internal audit and antifraud units. Kroll wrote another report that branded the units “ineffective.” Many employees accused of wrongdoing were not even questioned; some “received a promotion shortly after the suspicions of fraudulent activities had surfaced.”

None of these findings, though, had slowed Mr. Castro-Wright’s rise.

Just days before Mr. Cicero’s first debriefing, Mr. Castro-Wright was promoted again. He was put in charge of all Wal-Mart stores in the United States, one of the most prominent jobs in the company. He also joined Wal-Mart’s executive committee, the company’s inner sanctum of leadership.

The Initial Response

Ms. Munich sent detailed memos describing Mr. Cicero’s debriefings to Wal-Mart’s senior management. These executives, records show, included Thomas A. Mars, Wal-Mart’s general counsel and a former director of the Arkansas State Police; Thomas D. Hyde, Wal-Mart’s executive vice president and corporate secretary; Michael Fung, Wal-Mart’s top internal auditor; Craig Herkert, the chief executive for Wal-Mart’s operations in Latin America; and Lee Stucky, a confidant of Lee Scott’s and chief administrative officer of Wal-Mart International.

Wal-Mart typically hired outside law firms to lead internal investigations into allegations of significant wrongdoing. It did so earlier in 2005, for example, when Thomas M. Coughlin, then vice chairman of Wal-Mart, was accused of padding his expense accounts and misappropriating Wal-Mart gift cards.

At first, Wal-Mart took the same approach with Mr. Cicero’s allegations. It turned to Willkie Farr & Gallagher, a law firm with extensive experience in Foreign Corrupt Practices Act cases.

The firm’s “investigation work plan” called for tracing all payments to anyone who had helped Wal-Mart de Mexico obtain permits for the previous five years. The firm said it would scrutinize “any and all payments” to government officials and interview every person who might know about payoffs, including “implicated members” of Wal-Mart de Mexico’s board.

In short, Willkie Farr recommended the kind of independent, spare-no-expense investigation major corporations routinely undertake when confronted with allegations of serious wrongdoing by top executives.

Wal-Mart’s leaders rejected this approach. Instead, records show, they decided Wal-Mart’s lawyers would supervise a far more limited “preliminary inquiry” by in-house investigators.

The inquiry, a confidential memo explained, would take two weeks, not the four months Willkie Farr proposed. Rather than examining years of permits, the team would look at a few specific stores. Interviews would be done “only when absolutely essential to establishing the bona fides” of Mr. Cicero. However, if the inquiry found a “likelihood” that laws had been violated, the company would then consider conducting a “full investigation.”

The decision gave Wal-Mart’s senior management direct control over the investigation. It also meant new responsibility for the company’s tiny and troubled Corporate Investigations unit.

The unit was ill-equipped to take on a major corruption investigation, let alone one in Mexico. It had fewer than 70 employees, and most were assigned to chasing shoplifting rings and corrupt vendors. Just four people were specifically dedicated to investigating corporate fraud, a number Joseph R. Lewis, Wal-Mart’s director of corporate investigations, described in a confidential memo as “wholly inadequate for an organization the size of Wal-Mart.”

But Mr. Lewis and his boss, Kenneth H. Senser, vice president for global security, aviation and travel, were working to strengthen the unit. Months before Mr. Cicero surfaced, they won approval to hire four “special investigators” who, according to their job descriptions, would be assigned the “most significant and complex fraud matters.” Mr. Scott, the chief executive, also agreed that Corporate Investigations would handle all allegations of misconduct by senior executives.

And yet in the fall of 2005, as Wal-Mart began to grapple with Mr. Cicero’s allegations, two cases called into question Corporate Investigations’ independence and role.

In October, Wal-Mart’s vice chairman, John B. Menzer, intervened in an internal investigation into a senior vice president who reported to him. According to internal records, Mr. Menzer told Mr. Senser he did not want Corporate Investigations to handle the case “due to concerns about the impact such an investigation would have.” One of the senior vice president’s subordinates, he said, “would be better suited to conduct this inquiry.” Soon after, records show, the subordinate cleared his boss.

The other case involved the president of Wal-Mart Puerto Rico. A whistle-blower had accused the president and other executives of mistreating employees. Although Corporate Investigations was supposed to investigate all allegations against senior executives, the president had instead assigned an underling to look into the complaints — but to steer clear of those against him.

Ms. Munich objected. In an e-mail to Wal-Mart executives, she complained that the investigation was “at the direction of the same company officer who is the target of several of the allegations.”

“We are in need of clear guidelines about how to handle these issues going forward,” she warned.

The Inquiry Begins

Ronald Halter, one of Wal-Mart’s new “special investigators,” was assigned to lead the preliminary inquiry into Mr. Cicero’s allegations. Mr. Halter had been with Wal-Mart only a few months, but he was a seasoned criminal investigator. He had spent 21 years in the F.B.I., and he spoke Spanish.

He also had help. Bob Ainley, a senior auditor, was sent to Mexico along with several Spanish-speaking auditors.

On Nov. 12, 2005, Mr. Halter’s team got to work at Wal-Mart de Mexico’s corporate headquarters in Mexico City. The team gained access to a database of Wal-Mart de Mexico payments and began searching the payment description field for the word “gestoria.”

By day’s end, they had found 441 gestor payments. Each was a potential bribe, and yet they had searched back only to 2003.

Mr. Cicero had said his main gestores were Pablo Alegria Con Alonso and Jose Manuel Aguirre Juarez, obscure Mexico City lawyers with small practices who were friends of his from law school.

Sure enough, Mr. Halter’s team found that nearly half the payments were to Mr. Alegria and Mr. Aguirre. These two lawyers alone, records showed, had received $8.5 million in payments. Records showed Wal-Mart de Mexico routinely paid its gestores tens of thousands of dollars per permit. (In interviews, both lawyers declined to discuss the corruption allegations, citing confidentiality agreements with Wal-Mart.)

“One very interesting postscript,” Mr. Halter wrote in an e-mail to his boss, Mr. Lewis. “All payments to these individuals and all large sums of $ paid out of this account stopped abruptly in 2005.” Mr. Halter said the “only thing we can find” that changed was that Mr. Castro-Wright left Wal-Mart de Mexico for the United States.

Mr. Halter’s team confirmed detail after detail from Mr. Cicero’s debriefings. Mr. Cicero had given specifics — names, dates, bribe amounts — for several new stores. In almost every case, investigators found documents confirming major elements of his account. And just as Mr. Cicero had described, investigators found mysterious codes at the bottom of invoices from the gestores.

“The documentation didn’t look anything like what you would find in legitimate billing records from a legitimate law firm,” a person involved in the investigation said in an interview.

Mr. Lewis sent a terse progress report to his boss, Mr. Senser: “FYI. It is not looking good.”

Hours later, Mr. Halter’s team found clear confirmation that Mr. Castro-Wright and other top executives at Wal-Mart de Mexico were well aware of the gestor payments.

In March 2004, the team discovered, the executives had been sent an internal Wal-Mart de Mexico audit that raised red flags about the gestor payments. The audit documented how Wal-Mart de Mexico’s two primary gestores had been paid millions to make “facilitating payments” for new store permits all over Mexico.

The audit did not delve into how the money had been used to “facilitate” permits. But it showed the payments rising rapidly, roughly in line with Wal-Mart de Mexico’s accelerating growth. The audit recommended notifying Bentonville of the payments.

The recommendation, records showed, was removed by Wal-Mart de Mexico’s chief auditor, whom Mr. Cicero had identified as one of the executives who knew about the bribes. The author of the gestor audit, meanwhile, “was fired not long after the audit was completed,” Mr. Halter wrote.

Mr. Ainley arranged to meet the fired auditor at his hotel. The auditor described other examples of Wal-Mart de Mexico’s leaders withholding from Bentonville information about suspect payments to government officials.

The auditor singled out José Luis Rodríguezmacedo Rivera, the general counsel of Wal-Mart de Mexico.

Mr. Rodríguezmacedo, he said, took “significant information out” of an audit of Wal-Mart de Mexico’s compliance with the Foreign Corrupt Practices Act. The original audit had described how Wal-Mart de Mexico gave gift cards to government officials in towns where it was building stores. “These were only given out until the construction was complete,” Mr. Ainley wrote. “At which time the payments ceased.”

These details were scrubbed from the final version sent to Bentonville.

Investigators were struck by Mr. Castro-Wright’s response to the gestor audit. It had been shown to him immediately, Wal-Mart de Mexico’s chief auditor had told them. Yet rather than expressing alarm, he had appeared worried about becoming too dependent on too few gestores. In an e-mail, Mr. Rodríguezmacedo told Mr. Cicero to write up a plan to “diversify” the gestores used to “facilitate” permits.

“Eduardo Castro wants us to implement this plan as soon as possible,” he wrote.

Mr. Cicero did as directed. The plan, which authorized paying gestores up to $280,000 to “facilitate” a single permit, was approved with a minor change. Mr. Rodríguezmacedo did not want the plan to mention “gestores.” He wanted them called “external service providers.”

Mr. Halter’s team made one last discovery — a finding that suggested the corruption might be far more extensive than even Mr. Cicero had described.

In going through Wal-Mart de Mexico’s database of payments, investigators noticed the company was making hefty “contributions” and “donations” directly to governments all over Mexico — nearly $16 million in all since 2003.

“Some of the payments descriptions indicate that the donation is being made for the issuance of a license,” Mr. Ainley wrote in one report back to Bentonville.

They also found a document in which a Wal-Mart de Mexico real estate executive had openly acknowledged that “these payments were performed to facilitate obtaining the licenses or permits” for new stores. Sometimes, Mr. Cicero told The Times, donations were used hand-in-hand with gestor payments to get permits.

Deflecting Blame

When Mr. Halter’s team was ready to interview executives at Wal-Mart de Mexico, the first target was Mr. Rodríguezmacedo.

Before joining Wal-Mart de Mexico in January 2004, Mr. Rodríguezmacedo had been a lawyer for Citigroup in Mexico. Urbane and smooth, with impeccable English, he quickly won fans in Bentonville. When Wal-Mart invited executives from its foreign subsidiaries for several days of discussion about the fine points of the Foreign Corrupt Practices Act, Mr. Rodríguezmacedo was asked to lead one of the sessions.

It was called “Overcoming Challenges in Government Dealings.”

Yet Mr. Cicero had identified him as a participant in the bribery scheme. In his debriefings, Mr. Cicero described how Mr. Rodríguezmacedo had passed along specific payoff instructions from Mr. Castro-Wright. In an interview with The Times, Mr. Cicero said he and Mr. Rodríguezmacedo had discussed the use of gestores shortly after Mr. Rodríguezmacedo was hired. “He said, ‘Don’t worry. Keep it on its way.’ ”

Mr. Rodríguezmacedo declined to comment; on Friday Wal-Mart disclosed that he had been reassigned and is no longer Wal-Mart de Mexico’s general counsel.

Mr. Halter’s team hoped Mr. Rodríguezmacedo would shed light on how two outside lawyers came to be paid $8.5 million to “facilitate” permits. Mr. Rodríguezmacedo responded with evasive hostility, records and interviews show. When investigators asked him for the gestores’ billing records, he said he did not have time to track them down. They got similar receptions from other executives.

Only after investigators complained to higher authorities were the executives more forthcoming. Led by Mr. Rodríguezmacedo, they responded with an attack on Mr. Cicero’s credibility.

The gestor audit, they told investigators, had raised doubts about Mr. Cicero, since he had approved most of the payments. They began to suspect he was somehow benefiting, so they asked Kroll to investigate. It was then, they asserted, that Kroll discovered Mr. Cicero’s wife was a law partner of one of the gestores.

Mr. Cicero was fired, they said, because he had failed to disclose that fact. They produced a copy of a “preliminary” report from Kroll and e-mails showing the undisclosed conflict had been reported to Bentonville.

Based on this behavior, Mr. Rodríguezmacedo argued, the gestor payments were in all likelihood a “ruse” by Mr. Cicero to defraud Wal-Mart de Mexico. Mr. Cicero and the gestores, he contended, probably kept every last peso of the “facilitating payments.”

Simply put, bribes could not have been paid if the money was stolen first.

It was an argument that gave Wal-Mart ample justification to end the inquiry. But investigators were skeptical, records and interviews show.

Even if Mr. Rodríguezmacedo’s account were true, it did not explain why Wal-Mart de Mexico’s executives had authorized gestor payments in the first place, or why they made “donations” to get permits, or why they rewrote audits to keep Bentonville in the dark.

Investigators also wondered why a trained lawyer who had gotten away with stealing a small fortune from Wal-Mart would now deliberately draw the company’s full attention by implicating himself in a series of fictional bribes. And if Wal-Mart de Mexico’s executives truly believed they had been victimized, why hadn’t they taken legal action against Mr. Cicero, much less reported the “theft” to Bentonville?

There was another problem: Documents contradicted most of the executives’ assertions about Mr. Cicero.

Records showed Mr. Cicero had not been fired, but had resigned with severance benefits and a $25,000 bonus. In fact, in a 2004 e-mail to Ms. Munich, Mr. Rodríguezmacedo himself described how he had “negotiated” Mr. Cicero’s “departure.” The same e-mail said Mr. Cicero had not even been confronted about the supposed undisclosed conflict involving his wife. (Mr. Cicero flatly denied that his wife had ever worked with either gestor.) The e-mail also assured Ms. Munich there was no hint of financial wrongdoing. “We see it merely as an undisclosed conflict of interest,” Mr. Rodríguezmacedo wrote.

There were other discrepancies.

Mr. Rodríguezmacedo said the company had stopped using gestores after Mr. Cicero’s departure. Yet even as Mr. Cicero was being debriefed in October 2005, Wal-Mart de Mexico real estate executives made a request to pay a gestor $14,000 to get a construction permit, records showed.

The persistent questions and document requests from Mr. Halter’s team provoked a backlash from Wal-Mart de Mexico’s executives. After a week of work, records and interviews show, Mr. Halter and other members of the team were summoned by Eduardo F. Solórzano Morales, then chief executive of Wal-Mart de Mexico.

Mr. Solórzano angrily chastised the investigators for being too secretive and accusatory. He took offense that his executives were being told at the start of interviews that they had the right not to answer questions — as if they were being read their rights.

“It was like, ‘You shut up. I’m going to talk,’ ” a person said of Mr. Solórzano. “It was, ‘This is my home, my backyard. You are out of here.’ ”

Mr. Lewis viewed the complaints as an effort to sidetrack his investigators. “I find this ludicrous and a copout for the larger concerns about what has been going on,” he wrote.

Nevertheless, Mr. Herkert, the chief executive for Latin America, was notified about the complaints. Three days later, he and his boss, Mr. Duke, flew to Mexico City. The trip had been long-planned — Mr. Duke toured several stores — but they also reassured Wal-Mart de Mexico’s unhappy executives.

They arrived just as the investigators wrapped up their work and left.

A Push to Dig Deeper

Wal-Mart’s leaders had agreed to consider a full investigation if the preliminary inquiry found Mr. Cicero’s allegations credible.

Back in Bentonville, Mr. Halter and Mr. Ainley wrote confidential reports to Wal-Mart’s top executives in December 2005 laying out all the evidence that corroborated Mr. Cicero — the hundreds of gestor payments, the mystery codes, the rewritten audits, the evasive responses from Wal-Mart de Mexico executives, the donations for permits, the evidence gestores were still being used.

“There is reasonable suspicion,” Mr. Halter concluded, “to believe that Mexican and USA laws have been violated.” There was simply “no defendable explanation” for the millions of dollars in gestor payments, he wrote.

Mr. Halter submitted an “action plan” for a deeper investigation that would plumb the depths of corruption and culpability at Wal-Mart de Mexico.

Among other things, he urged “that all efforts be concentrated on the reconstruction of Cicero’s computer history.”

Mr. Cicero, meanwhile, was still offering help. In November, when Mr. Halter’s team was in Mexico, Mr. Cicero offered his services as a paid consultant. In December, he wrote to Ms. Munich. He volunteered to share specifics on still more stores, and he promised to show her documents. “I hope you visit again,” he wrote.

Mr. Halter proposed a thorough investigation of the two main gestores. He had not tried to interview them in Mexico for fear of his safety. (“I do not want to expose myself on what I consider to be an unrealistic attempt to get Mexican lawyers to admit to criminal activity,” he had explained to his bosses.) Now Mr. Halter wanted Wal-Mart to hire private investigators to interview and monitor both gestores.

He also envisioned a round of adversarial interviews with Wal-Mart de Mexico’s senior executives. He and his investigators argued that it was time to take the politically sensitive step of questioning Mr. Castro-Wright about his role in the gestor payments.

By January 2006, the case had reached a critical juncture. Wal-Mart’s leaders were again weighing whether to approve a full investigation that would inevitably focus on a star executive already being publicly discussed as a potential successor to Mr. Scott.

Wal-Mart’s ethics policy offered clear direction. “Never cover up or ignore an ethics problem,” the policy states. And some who were involved in the investigation argued that it was time to take a stand against signs of rising corruption in Wal-Mart’s global operations. Each year the company received hundreds of internal reports of bribery and fraud, records showed. In Asia alone, there had been 90 reports of bribery just in the previous 18 months.

The situation was bad enough that Wal-Mart’s top procurement executives were summoned to Bentonville that winter for a dressing down. Mr. Menzer, Wal-Mart’s vice chairman, warned them that corruption was creating an unacceptable risk, particularly given the government’s stepped-up enforcement of the Foreign Corrupt Practices Act. “Times have changed,” he said.

As if to underscore the problem, Wal-Mart’s leaders were confronted with new corruption allegations at Wal-Mart de Mexico even as they pondered Mr. Halter’s action plan. In January, Mr. Scott, Mr. Duke and Wal-Mart’s chairman, S. Robson Walton, received an anonymous e-mail saying Wal-Mart de Mexico’s top real estate executives were receiving kickbacks from construction companies. “Please you must do something,” the e-mail implored.

Yet at the same time, records and interviews show, there were misgivings about the budding reach and power of Corporate Investigations.

In less than a year, Mr. Lewis’s beefed-up team had doubled its caseload, to roughly 400 cases a year. Some executives grumbled that Mr. Lewis acted as if he still worked for the F.B.I., where he had once supervised major investigations. They accused him and his investigators of being overbearing, disruptive and naïve about the moral ambiguities of doing business abroad. They argued that Corporate Investigations should focus more on quietly “neutralizing” problems than on turning corrupt employees over to law enforcement.

Wal-Mart’s leaders had just witnessed the downside of that approach: in early 2005, the company went to the F.B.I. with evidence that the disgraced former vice chairman, Mr. Coughlin, had embezzled hundreds of thousands of dollars. The decision produced months of embarrassing publicity, especially when Mr. Coughlin claimed he had used the money to pay off union spies for Wal-Mart.

Meanwhile, Wal-Mart de Mexico executives were continuing to complain to Bentonville about the investigation. The protests “just never let up,” a person involved in the case said.

Another person familiar with the thinking of those overseeing the investigation said Wal-Mart would have reacted “like a chicken on a June bug” had the allegations concerned the United States. But some executives saw Mexico as a country where bribery was embedded in the business culture. It simply did not merit the same response.

“It’s a Mexican issue; it’s better to let it be a Mexican response,” the person said, describing the thinking of Wal-Mart executives.

In the midst of this debate, Ms. Munich submitted her resignation, effective Feb. 1, 2006. In one of her final acts, she drafted a memo that argued for expanding the Mexico investigation and giving equal respect to Mexican and United States laws.

“The bribery of government officials,” she noted dryly, “is a criminal offense in Mexico.”

She also warned against allowing implicated executives to interfere with the investigation. Wal-Mart de Mexico’s executives had already tried to insert themselves in the case. Just before Christmas, records show, Mr. Solórzano, the Wal-Mart de Mexico chief executive, held a video conference with Mr. Mars, Mr. Senser and Mr. Stucky to discuss his team’s “hypothesis” that Mr. Cicero had stolen gestor payments.

“Given the serious nature of the allegations, and the need to preserve the integrity of the investigation,” Ms. Munich wrote, “it would seem more prudent to develop a follow-up plan of action, independent of Walmex management participation.”

The Chief Weighs In

Mr. Scott called a meeting for Feb. 3, 2006, to discuss revamping Wal-Mart’s internal investigations and to resolve the question of what to do about Mr. Cicero’s allegations.

In the days before the meeting, records show, Mr. Senser ordered his staff to compile data showing the effectiveness of Corporate Investigations. He assembled statistics showing that the unit had referred relatively few cases to law enforcement agencies. He circulated copies of an e-mail in which Mr. Rodríguezmacedo said he had been treated “very respectfully and cordially” by Mr. Senser’s investigators.

Along with Mr. Scott, the meeting included Mr. Hyde, Mr. Mars and Mr. Stucky, records show. The meeting brought the grievances against Corporate Investigations into the open. Mr. Senser described the complaints in Mr. Lewis’s performance evaluation, completed shortly after the meeting. Wal-Mart’s leaders viewed Mr. Lewis’s investigators as “overly aggressive,” he wrote. They did not care for Mr. Lewis’s “law enforcement approach,” and the fact that Mr. Scott convened a meeting to express these concerns only underscored “the importance placed on these topics by senior executives.”

By meeting’s end, Mr. Senser had been ordered to work with Mr. Mars and others to develop a “modified protocol” for internal investigations.

Mr. Scott said he wanted it done fast, and within 24 hours Mr. Senser produced a new protocol, a highly bureaucratic process that gave senior Wal-Mart executives — including executives at the business units being investigated — more control over internal investigations. The policy included multiple “case reviews.” It also required senior executives to conduct a “cost-benefit analysis” before signing off on a full-blown investigation.

Under the new protocol, Mr. Lewis and his team would only investigate “significant” allegations, like those involving potential crimes or top executives. Lesser allegations would be left to the affected business unit to investigate.

“This captures it, I think,” Mr. Hyde wrote when Mr. Senser sent him the new protocol.

Four days after Mr. Scott’s meeting, with the new protocol drafted, Wal-Mart’s leaders began to transfer control of the bribery investigation to one of its earliest targets, Mr. Rodríguezmacedo.

Mr. Mars first sent Mr. Halter’s report to Mr. Rodríguezmacedo. Then he arranged to ship Mr. Halter’s investigative files to him as well. In an e-mail, he sought Mr. Senser’s advice on how to send the files in “a secure manner.”

Mr. Senser recommended FedEx. “There is very good control on those shipments, and while governments do compromise them if they are looking for something in particular, there is no reason for them to think that this shipment is out of the ordinary,” he wrote.

“The key,” he added, “is being careful about how you communicate the details of the shipment to José Luis.” He advised Mr. Mars to use encrypted e-mail.

Wal-Mart’s spokesman, Mr. Tovar, said the company could not discuss Mr. Scott’s meeting or the decision to transfer the case to Mr. Rodríguezmacedo. “At this point,” he said, “we don’t have a full explanation of what happened. Unfortunately, we realize that until the investigation is concluded, there will be some unanswered questions.”

Wal-Mart’s leaders, however, had clear guidance about the propriety of letting a target of an investigation run it.

On the same day Mr. Senser was putting the finishing touches on the new investigations protocol, Wal-Mart’s ethics office sent him a booklet of “best practices” for internal investigations. It had been put together by lawyers and executives who supervised investigations at Fortune 500 companies.

“Investigations should be conducted by individuals who do not have any vested interest in the potential outcomes of the investigation,” it said.

The transfer appeared to violate even the “modified protocol” for investigations. Under the new protocol, Corporate Investigations was still supposed to handle “significant” allegations — including those involving potential crimes and senior executives. When Mr. Senser asked his deputies to list all investigations that met this threshold, they came up with 31 cases.

At the top of the list: Mexico.

After the meeting with Mr. Scott, Mr. Senser had told Mr. Lewis in his performance evaluation that his “highest priority” should be to eliminate “the perceptions that investigators are being too aggressive.” He wanted Mr. Lewis to “earn the trust of” his “clients” — Wal-Mart’s leaders. He wanted him to head off “adversarial interactions.”

Mr. Senser now applied the same advice to himself.

Even as Mr. Halter’s files were being shipped to Mr. Rodríguezmacedo, Mr. Stucky made plans to fly to Mexico with other executives involved in the bribery investigation. The trip, he wrote, was “for the purpose of re-establishing activities related to the certain compliance matters we’ve been discussing.” Mr. Stucky invited Mr. Senser along.

“It is better if we do not make this trip to Mexico City,” Mr. Senser replied. His investigators, he wrote, would simply be “a resource” if needed.

Ten days after Mr. Stucky flew to Mexico, an article about Wal-Mart appeared in The Times. It focused on “the increasingly important role of one man: Eduardo Castro-Wright.” The article said Mr. Castro-Wright was a “popular figure” inside Wal-Mart because he made Wal-Mart de Mexico one of the company’s “most profitable units.”

Wall Street analysts, it said, viewed him as a “very strong candidate” to succeed Mr. Scott.

Case Closed

For those who had investigated Mr. Cicero’s allegations, the preliminary inquiry had been just that — preliminary. In memos and meetings, they had argued that their findings clearly justified a full-blown investigation. Mr. Castro-Wright’s precise role had yet to be determined. Mr. Halter had never been permitted to question him, nor had Mr. Castro-Wright’s computer files been examined, records and interviews show.

At the very least, a complete investigation would take months.

Mr. Rodríguezmacedo, the man now in charge, saw it differently. He wrapped up the case in a few weeks, with little additional investigation.

“There is no evidence or clear indication,” his report concluded, “of bribes paid to Mexican government authorities with the purpose of wrongfully securing any licenses or permits.”

That conclusion, his report explained, was largely based on the denials of his fellow executives. Not one “mentioned having ordered or given bribes to government authorities,” he wrote.

His report, six pages long, neglected to note that he had been implicated in the same criminal conduct.

That was not the only omission. While his report conceded that Wal-Mart de Mexico executives had authorized years of payments to gestores, it never explained what these executives expected the gestores to do with the millions of dollars they received to “facilitate” permits.

He was also silent on the evidence that Wal-Mart de Mexico had doled out donations to get permits. Nor did he address evidence that he and other executives had suppressed or rewritten audits that would have alerted Bentonville to improper payments.

Instead, the bulk of Mr. Rodríguezmacedo’s report attacked the integrity of his accuser.

Mr. Cicero, he wrote, made Wal-Mart de Mexico’s executives think they would “run the risk of having permits denied if the gestores were not used.” But this was merely a ruse: In all likelihood, he argued, Wal-Mart de Mexico paid millions for “services never rendered.” The gestores simply pocketed the money, he suggested, and Mr. Cicero “may have benefited,” too.

But he offered no direct proof. Indeed, as his report made clear, it was less an allegation than a hypothesis built on two highly circumstantial pillars.

First, he said he had consulted with Jesús Zamora-Pierce, a “prestigious independent counsel” who had written books on fraud. Mr. Zamora, he wrote, “feels the conduct displayed by Sergio Cicero is typical of someone engaging in fraud. It is not uncommon in Mexico for lawyers to recommend the use of gestores to facilitate permit obtainment, when in reality it is nothing more than a means of engaging in fraud.”

Second, he said he had done a statistical analysis that found Wal-Mart de Mexico won permits even faster after Mr. Cicero left. The validity of his analysis was impossible to assess; he did not include his statistics in the report.

In building a case against Mr. Cicero, Mr. Rodríguezmacedo’s report included several false statements. He described Mr. Cicero’s “dismissal” when records showed he had resigned. He also wrote that Kroll’s investigation of Mr. Cicero concluded that he “had a considerable increase in his standard of living during the time in which payments were made to the gestores.” Kroll’s report made no such assertion, people involved in the investigation said.

His report promised a series of corrective steps aimed at putting the entire matter to rest. Wal-Mart de Mexico would no longer use gestores. There would be a renewed commitment to Wal-Mart’s anticorruption policy. He did not recommend any disciplinary action against his colleagues.

There was, however, one person he hoped to punish. Wal-Mart de Mexico, he wrote, would scour Mr. Cicero’s records and determine “if any legal action may be taken against him.”

Mr. Rodríguezmacedo submitted a draft of his report to Bentonville. In an e-mail, Mr. Lewis told his superiors that he found the report “lacking.” It was not clear what evidence supported the report’s conclusions, he wrote. “More importantly,” he wrote, “if one agrees that Sergio defrauded the company and I am one of them, the question becomes, how was he able to get away with almost $10 million and why was nothing done after it was discovered?”

Mr. Rodríguezmacedo responded by adding a paragraph to the end of his report: They had decided not to pursue “criminal actions” against Mr. Cicero because “we did not have strong case.”

“At the risk of being cynical,” Mr. Lewis wrote in response, “that report is exactly the same as the previous which I indicated was truly lacking.”

But it was enough for Wal-Mart. Mr. Rodríguezmacedo was told by executives in Bentonville on May 10, 2006, to put his report “into final form, thus concluding this investigation.”

No one told Mr. Cicero. All he knew was that after months of e-mails, phone calls and meetings, Wal-Mart’s interest seemed to suddenly fade. His phone calls and e-mails went unanswered.

“I thought nobody cares about this,” he said. “So I left it behind.”