I know it’s wrong to gloat, but residents of Hyde Park showed the University of Chicago a thing or two by voting the 39th precinct of the Fifth Ward dry in an Election Day referendum.

With the vote to “reinstate prohibition,” as an editorial in the student-run Chicago Maroon put it, the residents effectively killed the university’s plans to replace the old Doctors Hospital of Hyde Park at 5800 S. Stony Island and replace it with two hotels.

So now the university doesn’t know what it’s going to do with the property, which was vacated after the hospital went bankrupt in 2000. It’s hard enough to find money for development in these tough economic times, and the last thing Hyde Park needs is a big vacant building.

But this is one of those rare moments in Chicago politics where the chickens outfoxed the foxes.

In 2006 the university bought the hospital and announced it would lease it to White Lodging of Merrillville, Indiana, whose chairman, Bruce White, is a member of the University of Chicago Medical Center Board of Trustees. In 2007, White Lodging unveiled a plan to demolish the hospital and put up a 17-story, 380-room building divided into two hotels.

Residents in the area rebelled for several reasons: They didn’t want the old limestone and brick hospital demolished, they thought the new design was ugly, and they were turned off by White Lodging’s labor policies. None of the company’s 160 or so hotels are unionized.

Fifth Ward alderman Leslie Hairston, while not endorsing the plan, urged residents to work with the university to reach a compromise. But by summer residents had concluded that the university would never alter its plans. So they decided to try and vote the precinct dry. If White Lodging couldn’t sell liquor, there was really no way it could operate a hotel, especially one with a full-service restaurant.

In order to get the referendum on the ballot for the November election, neighborhood residents needed to collect signatures from 25 percent of voters registered for the last general election. “There were 606 voters in the 2006 gubernatorial election,” says Greg Lane, a vice president for Granta magazine who helped lead the fight against the hotel. “We needed 151.5 signatures—or 152, if you’re rounding up.”

Lane and his allies figured the university would probably challenge the validity of their signatures in order to get the referendum knocked off the ballot, so they knew they needed a lawyer. But good election-law lawyers are hard to find. They charge a lot, and so they usually end up working for the side with the most clout, which in this case would clearly be the university.

Here’s where things got interesting. The Hyde Parkers had allied themselves with UNITE HERE Local 1, the hotel workers’ union, which had already been trying to force White Lodging to unionize its other hotels. This proved to be their ace in the hole. The officials at Local 1 did what any relatively well-connected bunch in Chicago would do: they called 14th Ward alderman Edward Burke, who advised them to call “my friend Mike Kasper,” says Lane.

Kasper, as loyal readers may recall, is the election-law expert Illinois House speaker Michael Madigan turns to when he wants to bounce some nettlesome third-party or independent candidate from the ballot.

“We called Kasper and said, ‘We have 180 signatures’—more than you need,” recalls Lane. “And he said, ‘Great, go out and get more—get every voter in the precinct.’ We said, ‘Mike, it’s impossible.’ He said, ‘Look, I’m usually on the other side. I know how to do these things. Looking at your petitions, I could get this knocked off.'”

So back out they went, going door-to-door, rounding up a total of 289 signatures. They filed the petition in August. In response the university brought out a battery of its own lawyers who sued to keep the referendum off the ballot, and the game was on.

The university lawyers asked that each and every one of the 289 signers be deposed under oath about whether he or she had actually signed the petition. They also wanted each signature examined by a handwriting expert who would compare it to the signature on the resident’s voter registration.

Their strategy was clear: keep the issue bound up in red tape until after the election. But Cook County judge Edward O’Brien ruled against bringing in the handwriting experts. The university dropped its suit and took the fight to the streets.

It put up a pretty good fight there, too. It sent students door-to-door, passing out pro-hotel leaflets. It hosted a meeting at the home of a resident who supported the hotel. On the day of the election, it dispersed students to hand out flyers disparaging the opponents as “a few well-meaning but uninformed individuals” who “are attempting to block community input and a significant local opportunity.”

But by then the vote-dry effort had too much momentum. Endorsed by just about every well-known Hyde Parker, from author Sara Paretsky to former alderman Leon Despres, it passed by 20 votes: 254 to 234. “We were never against a hotel—we were against that hotel,” says Lane. “The real story here is that the university never legitimately tried to work with us. This referendum is a wake-up call for the university—a spectacular failure in community relations.”

The university’s not sure what it’s going to do with the old hospital now, says Robert Rosenberg, the university’s vice president for public affairs. “We’re back to square one. We need to see what we can do in a tough economic climate.”

In retrospect, it’s obvious it might have fared better in the referendum had they not generated so much ill will with the court battle. “Look, the other side was brilliant,” says Rosenberg. “We knew as soon as we heard about the referendum this wasn’t the usual guys. Maybe we didn’t get our message out as effectively as we should have. But there’s always things you could have done better.”

Of course, the university could keep the fight alive by trying to repeal the prohibition with another referendum in the 2012 election. That means retracing the process, gathering signatures from voters to put the matter on the ballot, and hiring a good lawyer. Maybe they should call Ed Burke and see if he’s got anybody to recommend.

Hear Ben Joravsky interviewed about this and other columns on the Mr. Radio podcast, mrradio.org/theworks. And for more on politics, see our blog Clout City.