In the early hours of the morning on April 18, 1906, Americans in the San Francisco Bay Area woke amidst an earth-shattering quake. While the 7.8 magnitude earthquake only lasted a minute, it ruptured 296 miles of California's coastline, and its consequences devastated the region.

Some 500 city blocks — with more than 25,000 buildings — were destroyed, and rampant fires spread through the city and burned for three days. More than half of city residents were left homeless, and 3,000 people died in the shaking and subsequent fires.

Read More: Why San Francisco is a nightmare, according to science

Louis P. Selby, an amateur photographer, was working in his family's confectionery shop on Market Street when the greatest natural disaster that ever hit San Francisco occurred. Selby grabbed a camera and took to the streets to document the aftermath of the 1906 earthquake.

More than a century later, Selby's grandson published the never-before-seen photos in a book: "When San Francisco Burned: A Photographic Memoir of the Great San Francisco Earthquake and Fire of 1906."

Here's what happened in San Francisco 103 years ago, shot through the lens of a local confectioner.