An uninhabitable 640-square-foot shack in San Francisco just sold for $2 million.

According to a report by NBC, the shack is unsafe to walk through and is missing a back wall.

However, the property comes with views of the city skyline and a pre-approved demolition permit.

The home was originally listed for $2.5 million in May but has received 2 price cuts since September. The most recent drop was in early December when the price fell from $2.25 million to $1.95 million.

Visit Business Insider's homepage for more stories.

San Francisco is home to one of the most expensive housing markets in the US.

Still, even in a city with a median home value of $1,352,300, finding an uninhabitable shack — that's missing a back wall — on the market for nearly $2 million is something of a shock.

According to Zillow, the tiny, 640-square-foot shack was bought by its current owners in 2016 for about $1.5 million.

Located in Potrero Hill, a hilly San Francisco neighborhood with a median home value of $1,403,800, the shack made headlines back in May when it was listed for a jaw-dropping $2.5 million.

A May 2019 report by ABC stated that after just a week on the market, listing agent Anne Laury had given out 22 disclosure packets to potential buyers. The shack got 2 price cuts: In September, the price of the shack fell from $2.5 million to $2.25 million. In early December 2019, the price was again cut, this time by another $300,000, to $1.95 million.

In an interactive collection of photos on Theta360.com, NBC reporter Jonathan Bloom takes viewers inside the shack. It's in shambles. The photos show furniture and pieces of wood scattered throughout the home. What appears to be the kitchen opens directly up into the overgrown backyard by way of the shack's missing back wall.

Despite the fact that the shack is unsafe to walk through, the property's nearly $2 million price tag does come with two redeeming factors. One of those comes in the shape of the views it affords of the city skyline. Bloom showcases that view, which he writes is "the real value of the property."

A view of the city skyline from the street in front of the shack. Google Maps

The other draw is that the current owners already have a permit to demolish the home, a rare feat in the city. If it had historic value, such as being one of the city's earthquake shacks built as temporary housing units after the 1906 earthquake, it wouldn't have qualified for demolition.

According to the listing, the property is pre-approved for a 2-unit building, with 4 floors, 4 bedrooms, 4 full bathrooms, a 2-car garage, and a private elevator to each floor.

Laury told Business Insider in December 2019 that since the price cut, she has given out 7 disclosure packages.

The real draw to the property, Laury told Business Insider, is its location and appeal to first-time buyers who are looking for a chance to buy into San Francisco's housing market.