The people of San Francisco have been marking 100 years since a catastrophic earthquake levelled the city.
Sirens sounded across the city at 0512 (1212 GMT), the time of the quake, as survivors and thousands of others gathered for a minute's silence.
On 18 April 1906 a quake of about 7.8 magnitude shook the San Andreas fault for just under a minute.
About 3,000 people died, most of them in fires that spread quickly through the ruins.
People filled the streets of downtown San Francisco for the pre-dawn memorial ceremony, which was held at Lotta's Fountain, a place where in 1906 quake survivors gathered to try to reunite with loved ones.
A group of survivors took centre stage at the ceremony
People dressed in period costumes mixed with the crowds of spectators as Mayor Gavin Newsom and several survivors arrived at the ceremony in vintage cars, escorted by antique fire engines.
As the hands of the clock at Lotta's Fountain reached 0512 Mr Newsom laid a wreath and the crowd, estimated at about 10,000 people, blew earthquake whistles and then fell silent.
A moment later church bells rang out and alarms sounded.
'Example to others'
In a speech Mr Newsom paid tribute to both the city and those caught up in the disaster, saying they provided a "shining example" to other cities brought low by disaster such as New Orleans.
"Who would have imagined that just a few days after that people would literally dust off and step up and seek to resolve to rebuild their home in the miraculous way that we see it here today?" Mr Newsom said.
Today the San Francisco area is home to 6.5 million people, but remains vulnerable to major earthquakes.
Seismologists say there is a 62% chance of a major earthquake in the next 30 years but cannot be more exact, says the BBC's Duncan Kennedy in San Francisco.
A century ago San Francisco was renowned the world over, often compared to Paris.
As huge fires broke out after the quake, residents tried blowing up blocks to stop the flames leaping between buildings. But it did not work.
Mildred Martensteen was nine years old when the quake struck.
She recalled waking up to shaking windows and doors - "a commotion", she said.
"Oh yes, it was horrible. [It] just kept burning and burning.
"We'd go [to] different points and watch it and then you knew at the time that they couldn't stop the fire because they couldn't get any water."
Buildings in modern San Francisco are described as earthquake-resistant, not earthquake-proof.
Stephen Tobriner, an architectural historian at the University of Berkeley, told the BBC he was happy with the strength of the city's modern buildings.
"I would be happy to be in this building in an earthquake. As it is retro-fitted, I think it is a safe building," he said.
Mr Tobriner believes San Francisco can survive another quake, but remains worried.
"I find myself on the optimistic side. I think that most buildings will survive. I think the infrastructure will survive, but I'm worried about our water supply."
Have you attended a ceremony to mark the anniversary?
My great grandmother was a survivor of the 1906 Earthquake and Fire. Her father owned a lumber yard that in what is the Cow Hollow neighbourhood. After the earthquake and fire, like many, my great grandmother moved to Oakland with the rest of the family. Never to live in SF city limits again. To this day most of my family remains in the Bay Area despite the numerous earthquakes since. Even with the threat of another 'big one' the area is too beautiful not to stay. Which is why, after over 4 years in London, I will be moving back at the end of April!
Steve, London, UK
My grandmother survived the quake as a young girl. She said that her family was among the first to get their home's chimney certified so they could move back in; her father was a dairyman and they needed the stove for business. In early 1907 my grandfather, a young bricklayer from Germany, came to the city to help in the rebuilding - eventually starting his own construction company.
Shelley, Colorado Springs Colorado USA
My grandfather, born in San Francisco in 1892, was a 13-year-old boy living on Telegraph Hill in San Francisco with his sister, three brothers and parents at the time of the earthquake. His family all survived the quake but, like most structures in that part of the city, their house did not. They spent the next year living in a tent in the Presidio area, but were eventually resettled in the city. My grandfather told me that Oakland, was built up by earthquake survivors who moved across the bay. My grandfather went to other adventures, including service in the Army in France during the First World War (where he was wounded by shrapnel), but went on to live a long life - in San Francisco, of course. He died at 92 (in 1984), and I still miss him. I wish I could be at the celebration, but I now live in Southern California, and have other obligations to attend to. My mother, who still lives in the San Francisco Bay Area, is also not attending, but she is delighted by all of the interest and earthquake coverage.
Michael Weiss, Pasadena, CA, USA
My father went to work on the rebuild of San Francisco. He landed in the USA on the 28th of April 1906 on the boat Etruria
George Daws, Kings Lynn, England
Lloyd's held a service in the Underwriting Room. I wonder how many San Francisco residents today remember the name Cuthbert Heath? He played a major part in the Cities rebuild. Go look him up.
Julia, London, UK
My sister lives in SFC and during the 1989 quake we were all really worried. Nowadays when we hear of quakes in SF we are immediately on the phone. She just laughs and says she doesn't even get out of bed for anything less than a "six point fiver!" Her house is smack bang on the "Hayward" fault line and she had to sign a disclaimer when buying her house!
Gary Pentland, London, UK
I'm about to get ready to go get on a free bus (MUNI is free for the centennial celebration!) at 4am PST and participate in the ceremony. This just seemed too historical - and unique - of an opportunity to miss! Should be fun...perhaps I'll let you know!
Holly Severson, San Francisco, USA
As a student at University of California, Berkeley who hails from Texas, the thought of a major earthquake scares me much more than the several tornados I've been through. I'll definitely be attending the ceremonies tomorrow to commemorate the centennial.
Jeff, Berkeley, CA, USA