The old man, nearly 80 and recovering from knee-replacement surgery, shuffled along with a cane. The younger man held his arm gently, like a good son, helping him along as they smiled and shared private jokes.

A mundane moment, except for the amazed faces on everyone watching that day in April 2001 in Mexico City. The younger man was Jorge Castaneda, Mexico's foreign minister, who in his youth was a devoted Marxist who once took target practice with a Soviet-made AK-47 assault rifle in Fidel Castro's Cuba. And the old man was Sen. Jesse Helms, America's ardent anti-communist who had long viewed Mexico as an untrustworthy neighbor and Castaneda as redder than Red Square.

There they were, the Republican lion saying nice things about Mexico, and Castaneda, his radical ways long since jettisoned for expensive suits and moderate politics, nudging his skeptical country toward a romance with Washington, the capital of capitalism.

"It was a striking image to me," said a prominent U.S. Republican official who was there. "There was a certain amount of audacity in him being there with Helms. But he did it; he took the risk. I have been a fierce critic of Castaneda, but he earned my respect that day."

Castaneda, 49, formally resigned today after two years as President Vicente Fox's foreign policy architect and cerebral sidekick -- one commentator here said Fox's largely colorless cabinet had "given itself a lobotomy" by letting him go. But Castaneda was also Fox's most controversial and maddening cabinet member, with a knack for making enemies with his acid tongue.

Admirers say that wooing Helms showed maturity and smarts, and a devotion to better U.S.-Mexico relations. But detractors say cozying up to Helms showed Castaneda trading principles for political gain. Old allies from the left say that as soon as he got into power he abandoned them to cozy up to the United States, which ultimately yielded him little more than frustration on the Fox government's number one priority: reform of immigration laws.

"You can't abandon a lifetime's agenda suddenly when you're in power," said Ricardo Pascoe, whom Castaneda fired as ambassador to Cuba in September.

Castaneda said in an interview later today that he did not think his inability to win immigration reforms meant that the United States had let him down.

"I think circumstances were such after 9/11 that they clearly and understandably decided that not just the immigration issue, but the entire Mexican relationship, was no longer the central part of U.S. policy, or even one of the most important issues," Castaneda said. "If they had continued with immigration, they would have a tremendous success to show to the rest of the world. It would have been a great feather in [President] Bush's cap.

"I think we could have achieved spectacular progress in the broad gamut of the U.S.-Mexico relationship," Castaneda said. "It's a pity that it didn't happen, but I still think it can be achieved. I am absolutely convinced that for Mexico this is the only possible and correct foreign policy. We have to stick with it until the results come in. It will take longer than I hoped, but I am convinced it's the way to go."

In announcing his resignation during an appearance with Fox, Castaneda said politics is not his calling. "Those of us who are not professional politicians must know when to enter the political arena to fight for our ideas, and when it's the right moment to leave," he said. "For me, that moment has arrived."

Castaneda said he will return to his previous jobs -- teaching political science at a Mexico City university, teaching at New York University and writing in the U.S. and Mexican press. Fox named Luis Ernesto Derbez, a former World Bank economist, to replace him.

Castaneda leaves admirers who say he was a rare visionary who had original ideas and fought for them against the dead weight of tradition. Defying Mexico's self-absorbed past, he dragged the country into the thick of world affairs, giving it a stature it had never enjoyed in Washington and winning a seat on the U.N. Security Council, where Mexico was a player on the recent resolution on Iraq. He vastly improved Mexico's standing among international human rights groups and helped engineer an important free-trade agreement with the European Union.

"We have lost someone who recognized the realities of the modern world," said Jeffrey Davidow, the U.S. ambassador to Mexico from 1997 to 2002. "He also had a habit of speaking the truth, which was refreshing after so many years of Mexico's obfuscatory foreign policy."

Castaneda has an impeccable pedigree: He has degrees from Princeton and the University of Paris, and he speaks English and French. His shoes are perfect. His father was foreign minister. He has written some of the best-selling books on Latin America's left. His mind is like something NASA might have cooked up.

His mouth is a problem. He suffers fools badly, and he finds them everywhere. He said Mexican reporters should not cover his trips to America until they learn English. He said many Mexican legislators should not make laws until they learn something -- anything. Even his friendships often end in roadkill. One of his former allies, Adolfo Aguilar Zinser, Mexico's ambassador to the United Nations, no longer speaks to him and would not comment for this article.

From the time he joined Fox's renegade campaign against the long-entrenched Institutional Revolutionary Party, or PRI, Castaneda was the force behind Fox's foreign policy. And when Fox, a former state governor and Coca-Cola executive with little experience in international affairs, went calling on official Washington during his 2000 presidential campaign, Castaneda's presence at his side added gravitas.

"I think Jorge gave candidate Fox a credibility, a standing -- particularly in the United States -- that he would not otherwise have enjoyed," said Thomas F. "Mack" McLarty, President Bill Clinton's chief of staff and the leader of a Mexican-American panel on immigration whose members included Castaneda.

McLarty recalled a dinner in Washington, before Fox was elected, at which Castaneda arrived late. McLarty said Fox teased Castaneda about his "Hollywood flair" for dramatic -- and often late -- entrances. He said Castaneda shot back a smart-aleck response to Fox, and everyone laughed. Castaneda's presence, he said, jump-started the evening.

"When Jorge got there, the tone of the conversation changed," McLarty said. "It became more lively, more serious, more focused."

That seriousness and Castaneda's facility for operating in Washington served him well in the early months of the Fox administration, which began in December 2000. Immigration reform was Fox's top priority, and he and Bush pledged in February 2001 to find ways to make it happen. While Fox and Bush played up their rancher-buddy ties, Castaneda set about the harder work of selling the plan in Washington.

But reluctance from the U.S. Congress, followed by the Sept. 11, 2001, terrorist attacks on the World Trade Center and the Pentagon, scuttled the budding immigration talks, and Castaneda and Fox have not been able to resuscitate them.

"Castaneda is a guy who understands the United States, but maybe not as well as he thinks he does," said the Republican official. "In the end his understanding was not that sophisticated, because I think he overplayed the immigration thing."

Despite his description of himself as a non-politician, Castaneda's departure has fueled rumors of presidential ambitions in 2006, which he declined to discuss. Said McLarty: "We certainly have not heard the last of Jorge Castaneda."

Mexican President Vicente Fox, center, greets his new foreign minister, Luis Ernesto Derbez, as departing Jorge Castaneda watches.