CARTAGENA, Colombia — Leaders at a summit meeting of many of the Western Hemisphere nations on Saturday discussed alternatives to what many consider a failed “war on drugs” that is too reliant on military action and imprisonment. But President Obama said flatly that “legalization is not the answer.”

The issue was placed on the agenda of the Summit of the Americas this weekend by the host, Colombia’s president, Juan Manuel Santos. Even so, Mr. Santos suggested that he had in mind some unspecified middle ground short of fully decriminalizing the drug trade that for years has undermined societies throughout the region, notably in Colombia.

“We have the obligation to see if we’re doing the best that we can do, or are there other alternatives that can be much more efficient?” Mr. Santos said during an informal panel discussion with Mr. Obama and President Dilma Rousseff of Brazil just before the summit meeting began. “One side can be all the consumers go to jail. On the other extreme is legalization. On the middle ground, we may have more practical policies.”

In his turn, Mr. Obama said, “I think it is entirely legitimate to have a conversation about whether the laws in place are ones that are doing more harm than good in certain places.”