MEXICO CITY -- On Nov. 2, Californians will vote on Proposition 19, deciding whether to legalize the production, sale and consumption of marijuana. If the initiative passes, it won't just be momentous for California; it may, at long last, offer Mexico the promise of an exit from our costly war on drugs.

The costs of that war have long since reached intolerable levels: more than 28,000 of our fellow citizens dead since late 2006; expenditures well above $10 billion; terrible damage to Mexico's image abroad; human rights violations by government security forces; and ever more crime. In a recent poll by the Mexico City daily Reforma, 67 percent of Mexicans said these costs are unacceptable, while 59 percent said the drug cartels are winning the war.

We have believed for some time that Mexico should legalize marijuana and perhaps other drugs. But until now, most discussion of this possibility has foundered because our country's drug problem and the U.S. drug problem are so inextricably linked: What our country produces, Americans consume. As a result, the debate over legalization has inevitably gotten hung up over whether Mexico should wait until the United States is willing and able to do the same.

Proposition 19 changes this calculation. For Mexico, California is almost the whole enchilada: Our overall trade with the largest state of the union is huge, an immense number of Californians are of Mexican origin, and an enormous proportion of American visitors to Mexico come from California. Passage of Prop 19 would therefore flip the terms of the debate about drug policy: If California legalizes marijuana, will it be viable for our country to continue hunting down drug lords in Tijuana? Will Wild West-style shootouts to stop Mexican cannabis from crossing the border make any sense when, just over that border, the local 7-Eleven sells pot?

The prospect of California legalizing marijuana coincides with an increasingly animated debate about legalization in Mexico. This summer, our magazine, Nexos, asked the six leading presidential candidates whether, if California legalizes marijuana, Mexico should follow suit. Four of them said it should, albeit with qualifications. And last month, at a public forum presided over by President Felipe Calderón, one of us asked whether the time had come for such discussion to be taken seriously. Calderón's reply was startlingly open-minded and encouraging: "It's a fundamental debate," he said. ". . . You have to analyze carefully the pros and cons and the key arguments on both sides." The remarks attracted so much attention that, later in the day, Calderón backtracked, insisting that he was vehemently opposed to any form of legalization. Still, his comments helped stimulate the national conversation.

A growing number of distinguished Mexicans from all walks of life have recently come out in favor of some form of drug legalization. Former presidents Ernesto Zedillo and Vicente Fox, novelists Carlos Fuentes and Angeles Mastretta, Nobel Prize-winning chemist Mario Molina, and movie star Gael García Bernal have all expressed support for this idea, and polls show that ordinary Mexicans are increasingly willing to contemplate the notion.

Indeed, as we have crisscrossed Mexico over the past six months on a book tour, visiting more than two dozen state capitals, holding town hall meetings with students, businesspeople, school teachers, local politicians and journalists, we have witnessed a striking shift in views on the matter. This is no longer your mother's Mexico -- conservative, Catholic, introverted. Whenever we asked whether drugs should be legalized, the response was almost always overwhelmingly in favor of decriminalizing at least marijuana.

The debate here is not framed in terms of personal drug use but rather whether legalization would do anything to abate Mexico's nightmarish violence and crime. There are reasons to think that it would: The White House Office of National Drug Control Policy has said that up to 60 percent of Mexican drug cartels' profits come from marijuana. While some say the real figure is lower, pot is without question a crucial part of their business. Legalization would make a significant chunk of that business vanish. As their immense profits shrank, the drug kingpins would be deprived of the almost unlimited money they now use to fund recruitment, arms purchases and bribes.

In addition, legalizing marijuana would free up both human and financial resources for Mexico to push back against the scourges that are often, if not always correctly, attributed to drug traffickers and that constitute Mexicans' real bane: kidnapping, extortion, vehicle theft, home assaults, highway robbery and gunfights between gangs that leave far too many innocent bystanders dead and wounded. Before Mexico's current war on drugs started, in late 2006, the country's crime rate was low and dropping. Freed from the demands of the war on drugs, Mexico could return its energies to again reducing violent crime.

Today, almost anyone caught carrying any drug in Mexico is subject to arrest, prosecution and jail. Would changing that increase consumption in Mexico? Perhaps for a while. Then again, given the extremely low levels of drug use in our country, the threat of drug abuse seems a less-than-pressing problem: According to a national survey in 2008, only 6 percent of Mexicans have ever tried a drug, compared with 47 percent of Americans, as shown by a different survey that year.

Still, real questions remain. Should our country legalize all drugs, or just marijuana? Can we legalize by ourselves, or does such a move make sense only if conducted hand in hand with the United States? Theoretically, the arguments in favor of marijuana legalization apply to virtually all drugs. We believe that the benefits would also apply to powder cocaine (not produced in Mexico, but shipped through our country en route from Latin America to the United States), heroin (produced in Mexico from poppies grown in the mountains of Sinaloa, Chihuahua and Durango) and methamphetamines (made locally with pseudoephedrine imported from China).

This is the real world, though, so we must think in terms of incremental change. It strikes us as easier and wiser to proceed step by step toward broad legalization, starting with marijuana, moving on to heroin (a minor trade in Mexico, and a manageable one stateside) and dealing only later, when Washington and others are ready, with cocaine and synthetic drugs.

For now we'll take California's ballot measure. If our neighbors to the north pass Proposition 19, our government will have two new options: to proceed unilaterally with legalization -- with California but without Washington -- or to hold off, while exploiting California's move to more actively lobby the U.S. government for wider changes in drug policy. Either way, the initiative's passage will enhance Calderón's moral authority in pressing President Obama.

Our president will be able to say to yours: "We have paid an enormous price for a war that a majority of the citizens of your most populous and trend-setting state reject. Why don't we work together, producer and consumer nations alike, to draw a road map leading us away from the equivalent of Prohibition, before we all regret our short-sightedness?"

Héctor Aguilar Camín is a historian, a novelist and the publisher and editor of the Mexican magazine Nexos. Jorge G. Castañeda was Mexico's foreign minister from 2000 to 2003 and teaches at New York University.