Big construction projects in San Francisco often take years to get approved and can be held up for any number of reasons. And yet even our jaded eyes were a bit agog at the tale of one local man's battle against a developer set to get him out of his home, and how, in the end, both he and the developer got what they wanted. San Francisco Magazine takes us on a deep dive into the story of the eccentric man and odd property, known as the Barn, which stood in the way of developer Build Inc.'s plans to construct 1,000 condos on the eastern edge of the city.

Michael Hamman, the magazine tells us, bought in 1997 what was once part of a boatyard and spent years working on the property himself to turn it both into a home and a refuge for artists from all over the city. However, in order to go ahead with its planned project, Build Inc. needed to do foundation grading work that would in all likelihood make Hamman's home unlivable. Basically, they needed him gone, but Hamman wasn't going to budge.

“I was going to go to battle,” he told SF Mag. “They had to realize that their money was not the be-all, end-all atomic bomb they had imagined it would be. Not for me.”

And so a contest of both wit and stubbornness began. From the magazine:

Almost all of [Grant Barbour of Build Inc.'s] deals involve finding a seller’s price. “Ninety-eight percent of my negotiations are about price,” he says. “So many people start off pretending that it is not about the money, but in the end it is about the money.” But from the start, Barbour realized that this deal would be different. Every few weeks at the beginning of negotiations, he would show up at 9 a.m. at the Barn, sometimes with [Lou Vasquez of Build Inc.], and meet with Hamman. He says the negotiations were always just about asking Hamman what he wanted to do with his life and where and how he wanted to live, and that Build Inc. never made any actual cash offers. But little progress was made.

Almost two years of back and forth went by before a uniquely San Franciscan solution was agreed upon: Why not just move the Barn to a similar piece of land out of the developer's way?

Build Inc. has submitted plans for its India Basin development to the city, as well as an EIR for moving the Barn. If those plans are approved, two or three years from now the company will build a road to a plot of land about 800 feet east of the Barn, on the edge of the bay. After it lays utility and sewer lines to the site—which it will also be doing for the rest of the development—and builds a foundation, Build Inc. will construct a new bottom floor and mezzanine level for the structure. The firm didn’t agree to fashion the hill Hamman wanted, so the new ground floor will be designed to stand on flat ground. A new feature is an elevator that will serve every floor. And, of course, there will be land for Shaun.

When the site is ready, contractors will cut off the top two floors of the Barn. Exactly how those floors will be moved is still under discussion. Hamman advocates that they place the Barn on a platform on specially laid railroad tracks to convey it to the new site.

Ever the eccentric, Hamman's plan is to stand on top of the building as it is moved.

"I guarantee you this is the most complicated real estate deal in San Francisco history,” Barbour told the magazine. “It took Michael’s imagination, my creativity, and a lot of bourbon.”

Whatever the recipe, both Hamman and developers got what they wanted — preserving a bit of weird and wonderful San Francisco in the process.

Related: The Real Story Of The Great Highway Shack That Sold For $1.2 Million Is Priceless