The Mexican Supreme Court’s ruling, which applies only to the four plaintiffs seeking a right to grow marijuana, does not strike down the country’s marijuana laws. But it will open the way to more legal challenges and put pressure on President Enrique Peña Nieto and the Mexican Congress to change the law, which has helped to fuel drug-related crime in the country.

Prohibition in Mexico and elsewhere in the Americas will also become harder to maintain if California voters legalize recreational use of marijuana. Activists there are seeking to put legalization initiatives on the 2016 ballot. California was the first state to allow medicinal use of the drug in 1996, and it is a big market for illegal Mexican cannabis. It would make little sense for Mexico to spend countless millions a year in drug enforcement to ban a substance that is legal and regulated across its northern border all the way up the western coast to Canada. Oregon and Washington have already legalized the drug, as have Colorado, Alaska and the District of Columbia.

Some proponents of keeping prohibition in place might be encouraged by the defeat of an Ohio legalization initiative on Tuesday. But voters did the right thing by rejecting that measure because it would have granted a monopoly over the growing and sale of legal marijuana to a small group of investors. Even the acting administrator of the Drug Enforcement Administration, Chuck Rosenberg, who opposes legalization, described that ballot measure as an “anomaly.” (Mr. Rosenberg also said marijuana was “harmful and dangerous” but he acknowledged that other dangerous substances are “perfectly legal.”)

What’s needed now is responsible leadership from President Obama and Congress. They ought to seriously consider the kind of legislation Mr. Sanders has proposed. His bill would remove marijuana, or “marihuana” as it is called in federal law, from Schedule I of the Controlled Substances Act, which is meant for drugs that have a high potential for abuse and no medical use.

This change would allow states to decide if they want to make the drug legal and how to regulate it without being limited by federal law. Mr. Sanders’s bill would also make it illegal to transport the drug across state lines. If Congress is unwilling to act, Mr. Obama should move on his own by ordering the attorney general to request a study by the secretary of health and human services, which would be needed if the administration is to remove the drug from Schedule I on its own.