WASHINGTON -- A bipartisan measure that would have eliminated funding for federal raids on medical marijuana dispensaries in states where they're legal failed Wednesday in the House of Representatives. The legislation, introduced by Reps. Dana Rohrabacher (R-Calif.), Sam Farr (D-Calif.), Maurice Hinchey (D-N.Y.), and Tom McClintock (R-Calif.), was part of the appropriations bill to fund the Department of Justice for fiscal 2013. It failed 262-163.

(Watch Farr's address to Congress above.)

The bill came as the administration of President Barack Obama has unleashed an interagency crackdown on the cannabis industry, with raids on pot dispensaries, many in California operating in full compliance with state law. Since October 2009, the Justice Department has conducted more than 170 aggressive SWAT-style raids in nine states that allow medical marijuana, resulting in at least 61 federal indictments, according to data compiled by Americans for Safe Access, an advocacy group. While medical marijuana is legal under laws in 17 states and the District of Columbia, federal law says any use of marijuana is illegal.

The failed bill's text reads as follows:

None of the funds made available in this Act to the Department of Justice may be used, with respect to the States of Alaska, Arizona, California, Colorado, Delaware, District of Columbia, Hawaii, Maine, Maryland, Michigan, Montana, Nevada, New Jersey, New Mexico, Oregon, Rhode Island, Vermont, and Washington, to prevent such States from implementing their own State laws that authorize the use, distribution, possession, or cultivation of medical marijuana.

Of the 190 Democrats in the House, 134 (more than 70 percent) voted in favor of the bill. Only 29 of the 242 House Republicans (less than 12 percent) did.

"If states' rights aren't a good enough reason to pass this amendment, do it because of compassion. Compassion demands it," said Farr in his statement Wednesday on the House floor. "We offer this amendment for terminal cancer patients," he added, "for AIDS victims, for persons who suffer chronic pain. We offer this amendment not only to protect those people, but we offer this amendment to protect the states that are progressive enough to provide alternative medical options to those who need it."