WASHINGTON -- In early 2009, El Paso Rep. Sylvestre Reyes (D) warned city council members that, if they approved a resolution calling for a debate on marijuana legalization, the city would jeopardize its federal funding.

Instead, what turned out to be at risk was Reyes' seat in the House of Representatives in 2012.

On Tuesday night, El Paso voters ousted Reyes in a Democratic primary, in favor of the council member who had pushed the 2009 legalization resolution, Beto O'Rourke.

Reyes, a former border control agent who was elected to Congress in 1996, had the backing of President Barack Obama and former President Bill Clinton. Reyes brought the popular Clinton to the district to campaign for him this year and dredged up his opponent's burglary and driving while intoxicated charges from the 1990s. It wasn't enough.

As the U.S.-backed drug war in Mexico has raged just across El Paso's border, Texas officials have struggled to cope with its consequences. O'Rourke, in 2009, successfully pushed a resolution through the city council that called on the federal government to consider legalization as one possible policy response to the spiraling violence.

President Obama, facing pressure from Latin American leaders, has said more recently that such a discussion is legitimate. But three years ago, even floating the notion was controversial. The mayor vetoed O'Rourke's resolution, and Reyes warned the council that, if it overrode the veto, federal funds would be at risk.

"All we're asking for is a conversation, and no important issue in the history of the United States -- social, criminal, legal or otherwise -- has ever been harmed by having an open discussion. That's all we're asking for today," said O'Rourke at the time.

City Rep. Emma Acosta said during debate on the veto override that she had finally been persuaded by the funding threat. "If we had voted yesterday, I would have voted in favor of it," she said in 2009.

Then-City Rep. Rachel Quintana, before switching her vote, explained that pressure from Reyes and the state legislators "absolutely pushed me over."

In switching their votes, other council members also cited the federal pressure.

Reyes acknowledged to HuffPost in 2009 that he was lobbying against the resolution.

"My concern always is, if we've got a negative connotation about things in my district," he said, then it makes getting federal dollars harder. He cited his long-running battle in Congress against the notion that El Paso was running out of water. Whenever he tried to get federal funds for El Paso's base, Fort Bliss, or other projects, his colleagues would raise the water issue. "Why invest government funds in facilities in an area that's going to run out of water?" he said they'd argue.

"So that's the concern. Any time you have negative perceptions, you open the door for others to use that as leverage to get more money in their districts and not in mine," he said. "I'm up here representing the district, and I can tell people, based on my experience, what helps me and what doesn't."

O'Rourke didn't give up the fight for legalization, instead challenging Reyes for his job in the 2012 primary. In April, he told HuffPost the drug war was a failure and is fueling the violence across the border.

Reyes tried to make it a campaign issue, telling voters to "Say NO to drugs. Say NO to Beto."

They said no to Reyes.

Below, where you can find legalized medical marijuana in America:

Loading Slideshow...
  • Alaska

    Legalized for medical use. <a href="http://www.flickr.com/photos/alanasise/6847095796/" target="_hplink">Flickr: alana sise</a>

  • Arizona

    Legalized for medical use. <a href="http://www.flickr.com/photos/billward/110338154/" target="_hplink">Flickr: Bill Ward's Brickpile</a>

  • California

    Legalized for medical use. <a href="http://www.flickr.com/photos/gerbache/2260207829/" target="_hplink">Flickr: gerbache</a>

  • Colorado

    Also legalized possession by non-medical users. <a href="http://www.flickr.com/photos/dok1/520845832/" target="_hplink">Flickr: dok1</a>

  • Connecticut

    Legalized for medical use.

  • District Of Columbia

    Legalized for medical use. <a href="http://www.flickr.com/photos/bigberto/2770838680/" target="_hplink">Flickr: ~MVI~ (off to coron)</a>

  • Delaware

    Legalized for medical use. Flickr: <a href="http://www.flickr.com/photos/dougtone/7749689644/">Doug Kerr</a>

  • Hawaii

    Legalized for medical use. <a href="http://www.flickr.com/photos/ricardo_mangual/6006230817/" target="_hplink">Flickr: Ricymar Fine Art Photography</a>

  • Illinois

    Legalized for medical use.

  • Maine

    Legalized for medical use. <a href="www.flickr.com/photos/indywriter/2683524563/" target="_hplink">Flickr: indywriter</a>

  • Maryland

    Legalized for medical use.

  • Massachusetts

    Passed ballot initiative for legalized medical marijuana in 2012.

  • Michigan

    Legalized for medical use. <a href="http://www.flickr.com/photos/kayoticblue/213316452/" target="_hplink">Flickr: ckay</a>

  • Montana

    Legalized for medical use. <a href="http://www.flickr.com/photos/csbarnhill/2633187564/" target="_hplink">Flickr: csbarnhill</a>

  • Nevada

    Legalized for medical use. <a href="http://www.flickr.com/photos/http2007/4699361533/" target="_hplink">Flickr: http2007</a>

  • New Hampshire

    Legalized for medical use.

  • New Jersey

    Legalized for medical use. <a href="http://www.flickr.com/photos/paulflannery/4021996652/" target="_hplink">Flickr: psflannery</a>

  • New Mexico

    Legalized for medical use. <a href="http://www.flickr.com/photos/everyskyline/3134662783/" target="_hplink">Flickr: michaelwhitney</a>

  • Oregon

    Legalized for medical use. <a href="http://www.flickr.com/photos/d-powell/2099638403/" target="_hplink">Flickr: digging90650</a>

  • Rhode Island

    Legalized for medical use. Also decriminalized possession of less than one ounce.

  • Vermont

    Legalized for medical use. <a href="http://www.flickr.com/photos/bryanalexander/6129117/" target="_hplink">Flickr: BryanAlexander</a>

  • Washington

    Legalized for medical use. Also legalized possession by non-medical users. <a href="http://www.flickr.com/photos/rose_braverman/6924724331/sizes/l/in/photostream/" target="_hplink">Flickr: Rose Braverman</a>