Initiative 71 supporters celebrated on Nov. 4 as early returns showed the ballot measure to legalize pot in the District was headed to overwhelming victory. It passed on a more than 2-1 margin. (Michael S. Williamson/The Washington Post)

The District will be prohibited from legalizing marijuana for the much of the coming year under a spending deal reached Tuesday between top Senate Democrats and House Republicans to fund the federal government through next September.

The development — upending voter-approved Initiative 71 — shocked elected D.C. leaders, advocates for marijuana legalization and civil liberties groups who earlier in the day had grown confident that the measure would be at least partially protected while Democrats still controlled the Senate.

However, with Republicans set to take control of the chamber in January, the defeat suggested that the will of D.C. voters — who approved marijuana legalization last month by a margin of more than 2 to 1 — may be suspended indefinitely.

(Related: Five reasons why D.C. may still declare pot legal)

“I can’t believe they did this,” D.C. Council Chairman Phil Mendelson (D) said. “We don’t need to be locking these people up.”

“It’s totally disturbing; it’s entirely undemocratic,” said Adam Eidinger, who led the efforts to collect over 57,000 signatures this year to put the measure before D.C. voters.

Late Tuesday, Eidinger said marijuana advocates were organizing a protest that would begin Wednesday evening at the Justice Department and march to Capitol Hill with the potential for several advocates to seek arrest.

“I’m ready for some civil disobedience. If you’re going to overturn an election, you might as well say something before it’s done.”

The developments capped a roller-coaster 24 hours in the worst possible way for advocates of the District’s marijuana measure.

Late Monday, congressional aides had floated the possibility that the spending deal would include a provision sought by conservative House Republicans to block the voter-approved measure.

By midday Tuesday, it appeared negotiators had found middle ground to legalize possession of marijuana but to allow no further action by D.C. officials to create a regulatry system for legal sales and taxation of the plant.

But many warned that the partial constraints might prove to be a worse outcome, potentially leading to chaos for lawmakers and police officers trying to rewrite and enforce city drug laws.

View Graphic Support for legalized marijuana in D.C.

The ballot measure was written to allow for possession of up to two ounces of pot and home cultivation of up to three mature cannabis plants. It left up to city lawmakers the accompanying regulatory structure for how to legally sell and tax the plant.

Under a spending “rider” included in the 1,600-page bill distributed late Tuesday, neither part would be allowed.

The language could also roll back a law passed by the D.C. Council and signed by Mayor Vincent C. Gray (D) in the spring to join 18 states that have eliminated criminal penalties for marijuana possession.

D.C. now issues a $25 citation for marijuana possession, but under Monday night’s vote, the penalty may revert to one of greater severity.

Mendelson, reached late Tuesday, said he was dismayed Congress would send the city’s drug laws in reverse. “It’s bad enough that they were setting their sights on legalization, but for them to go further and undo decriminalization — it’s irrational when over a third of states have done so.”

The rider language mirrored an amendment introduced over the summer by Rep. Andy Harris, (R-Md.), the most outspoken congressional critic of D.C. legalization.

Earlier Tuesday, he predicted that any deal betwen Democrats and Republicans would signal widespread skepticism for marijuana legalization for recreational use.

Following a speech at the conservative Heritage Foundation, which was interrupted repeatedly by marijuana advocates, Harris said a deal would “show fairly broad-based support in Congress against legalization.”

Maryland’s only House Republican also said he had no qualms about interfering with the results of the Nov. 4 election. On that day, voters in Alaska, the District and Oregon chose to legalize marijuana, but only the District’s vote was subject to oversight by Congress.

“The fact is the Constitution gives Congress the ultimate oversight about what happens in the federal district,” Harris said.

It was unclear what Senate Democrats bargained for the marijuana restriction in the District but a sign that the measure was on the chopping block came Tuesday afternoon when Senate Majority Leader Harry M. Reid (D-Nev.) conceded that it appeared likely to remain part of the final bill.

“The District of Columbia should do what they want to do,” Reid said, adding that he opposes congressional limits on how the city implements Initiative 71 to legalize marijuana.

Another sign the measure was in trouble came when D.C. Democrats directed anger at senators of their own party. “I certainly don’t know why Democrats would agree to block legalization while we still control the White House, we still control the Senate — and who knows, they may even need Democratic votes to pass this,” said Del. Eleanor Holmes Norton.

The District’s nonvoting House member said she had been locked out of the decision-making process entirely. “I don’t even know which Democrats are in the room. . . . I cannot tell why Democrats would want to give Republicans a head start to do what they are going to be able to do, I suppose, in less than a month” when Republicans take control of the Senate.

Kimberly Perry, head of D.C. Vote, an organization dedicated to voting representation for the District in Congress, said any limits on how the city could implement the legislation would be unacceptable.

“If reports are true, members of Congress from both parties bargained away the rights of the people of the District of Columbia and in doing so compromised the core democratic values of the United States,” she said in a statement. Perry urged members of Congress to “vote against this attempt to undermine democracy.”

Congressional Republicans have previously used a similar technique to put limits on how the heavily Democratic city carries out liberal social policy, including spending its tax dollars to fund abortion coverage for the poor. For 11 years, congressional Republicans also used a similar spending “rider” to prevent the District from implementing a voter-backed measure to allow sales of medical marijuana.

D.C. Council member David Grosso (I-At Large), who has authored a bill for the District to allow legal sales of pot, issued a news release in response to the apparent deal titled “Don’t Blunt D.C.’s Election.”

“It is disheartening and frustrating to learn that once again the District of Columbia is being used as a political pawn by the Congress,” Grosso said. “To undermine the vote of the people — taxpayers — does not foster or promote the “limited government” stance House Republicans claim they stand for; it’s uninformed paternalistic meddling.”

Mariam Baksh contributed to this report.