After the first goodbye party, the Lab, an experimental art space in San Francisco’s Mission District, never did close. So then there was a second party. It didn’t close after that one, either, so a little later there was a “The Lab is Back!” party. This was about five years ago, and for a good while, that’s just how the Lab operated.

“It did sort of feel like one day we were going to show up and the doors would be chained,” says Anthony Russell, the Lab’s technical manager, who was a volunteer when he attended these parties. “It was very much in that DIY spirit: We’re just going to keep doing it until that happens. We’re just going to keep the party going.”

For 35 years, the Lab has been a place for wild artistic expression, for midnight poetry readings and large-scale digital and physical installations, for dancers covered in body paint and rockers working with noise. The Lab — a big empty hall with white walls, weathered wood floors and windows that let the sun fill it all — has been a place for, as its current poet-in-residence Tongo Eisen-Martin puts it, “a utopian reception of art.”

For all this and more, the Lab has always been well loved. But it has not always been well managed. During those precarious years, the space was full of things that barely worked, if they worked at all. The events were curated, but there was also a sense that it was kind of a free for all. The neighbors complained about the noise and an art piece once went missing. The space, a nonprofit with a staff made up mostly of volunteers, also owed $150,000 in back rent and taxes as of 2014.

That has all since changed.

The Lab is solvent now. In fact, more than that — it brings in some $360,000 a year, a third of which goes directly to artists. The space has also undergone an extensive remodel, and now the Mission Economic Development Agency is seeking to purchase the Redstone Building, giving the the Lab and three dozen other occupants a sense of security they haven’t had in years.

All of this was the work of dozens of people. But it’s also true, according to just about anyone involved with the Lab, that none of this would have happened if it weren’t for Dena Beard.

The Lab’s story is now Beard’s story, too. She came on as the Lab’s executive director four years ago and has performed something of a magic trick, rescuing an institution on the edge of collapse, professionalizing the place while staying true to its foundations.

“She really fiercely guards that San Francisco punk aesthetic from which the Lab was born,” says Jessica Shaefer, an arts consultant who sits on the board of directors. “But she’s also smart enough to know the Lab needed to grow up. It needed to transition into something that could support itself long-term, but not get too slick.”

The Lab was born in 1984, in a spot off Divisadero in Lower Pacific Heights, before it relocated in 1995 to 16th Street and the Redstone Building, a place full of studios, performance companies, unions and nonprofits.

If the Lab could speak, it would probably name-drop incessantly. A full accounting of the talent who have passed through the space would include photographer Nan Goldin; artists Barbara Kruger, David Wojnarowicz and Barry McGee; and musicians Kim Gordon and Kathleen Hanna.

But for all the names that seem so big now, the Lab was never a place of pretension. The shows at the Lab were ripe. They were loud, they were messy and, by all accounts, they were revolutionary.

The Lab flourished, in part, because of what Beard calls their “principle of refusal” — the refusal to take things at face value, to follow the usual path. “It was very much built on this like principle of refusal, like ‘We will not do the normative administrative stuff,’ ” she says. It was that same principle that eventually landed it in debt to the IRS and in jeopardy, again and again, of closing. “The punk ethos that it brought forward was also kind of the failure of that punk ethos.”

The Lab came calling for Beard in 2013. She spent hours poring over its finances, offering some help but ultimately turning down an offer to become director. She was finishing up a stint as a curator at the Berkeley Art Museum and wasn’t sure where to go next, but she also wasn’t sure sure she wanted to take on the Lab’s problems.

Eventually, however, Beard saw it for what it was: An opportunity to reset an unorthodox art space and at the same time further some of her own unorthodox ideals. “What I was looking for was a program that would allow me to give artists unrestricted funds and power over the institution itself.”

There are lots of words people used to describe Beard: Crazy. Genuine. Super humble. A warrior. All of these seem right. Beard, 38, has spent her professional life curating art in Berkeley, at the Museum of Contemporary Art Santa Barbara and at the Art Institute of Chicago. This is a resume, though, that somewhat obscures the fact that, through it all, she’s been looking for a way to completely reorient the art world.

She is radical ideals underneath a layer of professionalism; in some ways, she’s helped the Lab become the same.

During the summer of 2014, the Lab closed for an extensive “aesthetic reset.” Volunteers started by emptying the space of thousands of pounds of trash. “Everything was a little bit broken but still there,” Beard says. That means old tapes that were too muddy to be an archive of anything, a copy machine that refused to copy anymore and, eventually, pieces of the Lab itself.

There’s a time lapse video of the cleanup, construction workers in hard hats moving fast as ants as they break down the walls of an office (Beard didn’t see a use in having one) to open the hall up entirely. A pile of drywall grows on the floor, and then the linoleum comes up with layers and layers stripped away to reveal something new.

Then the volunteers come through, floating above the floor on little carts, pulling staples from the hardwood. A community came together for those weeks and months to reveal a new Lab that had actually been there all along.

Russell, the lab technician, was there, right alongside Beard. The way he saw it, the sooner they got the place up and running, the sooner the shows could start back up.

“I inherited this incredible group of volunteers who already loved the space and were already totally dedicated to it and they just showed up,” Beard says.

Beard had only $30,000 to work with, and half of that had to go to rent. So they searched for equipment donations and hung a floating sound ceiling — designed by Michael Goldwater, the Lab’s production manager, and assembled production-line-style by volunteers — for $3,000. Professionals had priced the ceiling at $90,000.

For some Lab veterans, it cleaned up a little too well. “I think a lot of the concern from people who had been going to lab for long time is that I was gentrifying the program,” Beard says. But it’s also true that, in some regards, the Lab is more revolutionary now than it has ever been.

After the Lab was made bright and new, Beard turned her attention to the organization’s finances. She wanted to get the Lab out of debt and start giving considerable amounts of money to artists each year. It took a year for Beard and an army of volunteers to clear it all. They held a 24-hour telethon of experimental art and sought donations on Kickstarters. Some of it was addressed, too, by negotiations with the IRS, space rentals and grants. Once the Lab was on stable footing, it became “pretty much an engine to redistribute wealth,” Beard says.

A third of the Lab’s budget each year now goes to three artists in residence, the grants ranging from $25,000 to $75,000. This year’s artist grants totaled about $120,000. At one point, Beard described herself as an “autocrat.” There’s no formal application process for these residencies, no board interviews, no nominations. Beard just identifies talent and hands them money (and keys to the space), no strings attached. It’s a level of freedom that is virtually unheard of.

Brontez Purnell, one of the earliest recipients of these residencies, got $95,000. With the money and the time and the space, the Oakland writer, dancer and musician tried his hand at filmmaking. The result was “Unstoppable Feat, The Dances of Ed Mock,” a hybridized documentary about a San Francisco postmodern choreographer who died in 1986 when the AIDS epidemic was reaching a fever pitch.

The Lab, Purnell says, had the “vision to say, ‘Hey, this HIV-positive, black, punk rock experimental artist wants to make a movie about one of his ancestors. This needs to happen.’ That’s what sets the Lab apart. It’s basically the last holdout of the San Francisco I remember when I stepped in here 16 years ago.”

The Lab’s current resident is Tongo Eisen-Martin, a celebrated Bay Area poet. Once a month he hosts midnight poetry readings. There’s no signup list, just poets spread out on the floor, walking up to the mike when they feel ready. He couldn’t do that anywhere else before the Lab, he says.

“It is just this sweet, sweet relief to not have to worry about venues, to take space out of the equation of curating. It’s like 75 percent of the headache is gone,” Eisen-Martin says.

In the center of the Lab’s ceiling is a camera, the sort Nest sells to most people for security. Beard installed it in after the remodel and connected it the Lab’s website. She put it up there, she says, to “revoke the idea … of the white-box art gallery,” to peel away at this idea that an art institution needs “slick jpegs and perfect shiny walls.”

Anytime, day or night, a person can see what’s happening at the Lab — poets performing anonymously onstage, dancers moving to unheard music, visuals flickering across projector screens.

For all the success of the past few years, Beard has some difficulty claiming victory — though, she admits, she no longer wakes up in the middle of the night worrying. Instead it’s the small moments the Lab’s ceiling camera catches that fill her up. “I treasure those,” she says. “It’s an evolving essay of a project.”