The San Francisco Rent Board sits on the third floor of an ornate former Masonic Temple near the city’s opera house. While Faust makes a pact with the devil on the stage down the street, this building has been the scene of a pitched, real-life drama over the character of this prospering city, where tenants make up more than sixty per cent of residents, and enjoy unusually strong protections against rent increases, evictions, and landlord misconduct. When tenants and their landlords are at odds, it’s the rent board that mediates.

And so, on a recent afternoon, Joey Koomas—a young, smartly dressed, and polite rent-board counselor—found himself standing behind a wooden desk, fielding questions from a d.j. who was fighting an eviction from the rent-controlled apartment where he’d lived since the mid-nineties, looking for a creative tactic to stay put. The d.j.’s landlord had been evicting many of the building’s tenants, and wasn’t replacing them with new ones. “So I was thinking,” the middle-aged, loafer- and sweater-clad man said. Could he break in and take over one of the empty apartments?

“Could you break in?” Koomas repeated, his voice registering a note of alarm. “I don’t think so. That would be breaking and entering, right? I certainly can’t advise you to break in.” He paused. “Is that what you’re asking me?”

“What can you do?”

“I don’t think there’s anything you can do. He’s not compelled by any laws to rent out units.”

“With all these problems going on in San Francisco?”

By “problems,” the tenant was referring to a rent war. Thanks to a second dot-com boom—which has drifted north, to San Francisco, from Silicon Valley suburbs like Palo Alto—there are now fifty-five thousand technology jobs in this cramped city of fewer than nine hundred thousand residents. With so many high-salaried techies able to pay exorbitant rents, and outbidding one another to pay even more, San Francisco’s rents have led the country in increases—they rose nearly eight per cent in the second quarter from a year ago, according to MPF Research. The average rent for the second quarter was one thousand nine hundred and ninety-nine dollars, according to Reis, up from one thousand nine hundred and twenty-one dollars a year earlier. Of course, only a certain well-heeled population can afford this. San Francisco public-health officials said last week that a tenant earning minimum wage would need to work more than eight full-time jobs to afford a two-bedroom apartment downtown.

The resulting class conflict has been nothing short of operatic, with emboldened landlords, crying tenants, and a chorus of editorials and bullhorn-wielding activists outside eviction sites.

“We get these stories every time there’s an economic recovery: ‘My rents are going up’; ‘We can’t find enough space,’ ” Mayor Ed Lee said at the TechCrunch Disrupt SF conference earlier this month. “We’ve got to build more housing in the city in order to accommodate and make sure we protect many of the rent-controlled apartments that we have.”

The rent surge means that many of those left out of the dot-com windfall are holding on to their homes through the city’s strong rent- and eviction-control protections for buildings built before 1979—nearly eighty per cent of the rental stock. (This year, the allowable rent increase is 1.9 per cent.)

If landlords can get rid of their existing tenants, they can charge whatever rent they like to new tenants (although, from that point on, they are again locked into regulated increases). Not surprisingly, evictions from San Francisco’s rent-controlled apartments are at an eleven-year high. In properties protected by the ordinance, landlords can evict only for one of fifteen “just causes”—including if the owner wants to move into his own unit, or is getting out of the rental business altogether to sell his rental properties as condos.

While eviction lawsuits are filed in state court, the rent board handles landlords seeking to push out tenants by increasing the rent for those they allege are breaking the rent-control rules, or by making tenants’ lives so miserable that they will leave on their own. During one recent arbitration session at the board, a property manager alleged that two tenants were using their apartment as a law office—a commercial use, not eligible for rent control. This month, a flight attendant in a rent-controlled apartment petitioned for a decrease in rent because her landlord had failed to fix a leak in her bathroom ceiling, despite cutting a hole in it. During the hearing, her landlord, Martin Eng, called the tenant jealous and racist, and said he was being persecuted “like Trayvon Martin.” (He told me later, “You don’t complain when you’re paying such a low rent.”)

Outside the arbitration rooms, Koomas and the other counselors are something like the rent-law equivalent of Lucy in “Peanuts” cartoons, minus the five-cent tip jar: they advise more than nine hundred walk-ins a month on the byzantine rent ordinance.

Landlords, too, come with tales of woe. Recently, a small-time landlord named Patrick Regan sat down with his attorney in one of the board’s arbitration chambers to present evidence that a tenant in his six-unit building in upscale Noe Valley had moved to Hawaii with a female friend, and was subletting his six-hundred-and-fifty-five-dollar one-bedroom apartment, which was rent-controlled. The rent checks from the past year even had an address in Hawaii.

Regan, an amiable man, white-haired but hale, had earlier refused the tenant’s attempt to get a sixty-four-thousand-dollar buyout in exchange for leaving. Since then, with “every rent check I got from Hawaii, it was like him sticking it into me, like, ‘Screw you. I’m in Hawaii, having a good time,’ ” he told me. Since rent control applies only to a tenant’s primary residence, not a pied-à-terre, Regan served the tenant in July with a rent increase to the market rate of two thousand four hundred and fifty dollars.

Then there are tenants like the flustered, clean-cut Syrian immigrant who rushed up to Koomas rolling a suitcase with an SFO airport tag still looped around the handle. Minutes earlier, he had returned to his apartment from a short-term Army assignment to find his lock changed and a notice on his door: his rent, for a converted hotel bedroom without a bathroom or kitchen, in the gritty Tenderloin neighborhood, would increase by four hundred dollars, to one thousand and fifty dollars, on December 1st.

“Do they have the right to lock me out, my stuff inside?” the tenant wondered.

“No,” Koomas said. “Even if they believe that you don’t live there, it doesn’t give them the right to change your lock.”

The man pulled out his I.D.: “It’s my address!”

“I believe you,” Koomas said, “but I’m not the judge,” and handed him a petition to fill out to complain of an unlawful rent increase. To gain access to his room, though, the tenant would have to call the police for help in tracking down the building manager.

Koomas then turned his attention to a chef named Fabian Guerrero, who wore a Chicago White Sox hat and had the words “STAY GOLD” tattooed on his knuckles. Guerrero said the master tenant in his house was covertly overcharging three subtenants—Guerrero among them—so that the master tenant and his friend could live there rent-free. “What he does is lies. He’s a liar and a thief,” the chef told Koomas. Koomas said he’d coordinate a time for an arbitration.

Guerrero told me he’d attempted to move out, visiting a room advertised on Craisglist for six hundred dollars. But the space was so small, “it was like a prison.” Not that his current situation is any better. Walking outside, onto the street, Guerrero continued venting about his worsening relations with the master tenant and his apparently rent-free crony. “I can’t even cook in my own kitchen,” he said. ”I took everything—my cast-iron skillets, my French-press coffee maker, my whisks and ladles and everything. I don’t trust them, and I don’t like them. But I’m proving a point.”

Photograph by Justin Sullivan/Getty.