Updated

It watched as its then-owner, King Charles I, was beheaded in 1649.

It was hanging in Buckingham Palace back when it was still called Buckingham House in 1703.

It survived the Nazis’ 1940 London Blitz when its keepers abandoned it in their basement.

By 1958, its origins had become so lost in time that it was sold for a paltry $90 to a collector from Louisiana.

The long, strange journey of Leonardo da Vinci’s masterwork “Salvator Mundi” takes its next turn Wednesday at Christie’s, when it goes under the hammer for a hoped-for $100 million.

It is the first Leonardo to emerge in nearly a century, and one of just 16 surviving paintings by the Renaissance Italian polymath.

“Salvator Mundi” — which translates to “Savior of the World” and depicts Jesus Christ holding an earth-like glass orb — was nearly forgotten forever during its 500-year journey from Italy to the Big Apple.

“We came pretty close to losing it,” Alan Wintermute, a Christie’s vice president and specialist in Old Master paintings, told The Post.

“It’s so rare that anything this important reappears in the way it has that you can’t help but be excited.”

Battered by time and marred by ham-handed attempts to restore it, the so-called “last da Vinci” was, for centuries, thought to be no more than a pupil’s copy of the original.

Leonardo is believed to have produced the work — painted in particularly expensive oil pigments on a walnut panel — sometime around 1500, most likely for then-King of France Louis XII, according to Dr. Robert Simon of Robert Simon Fine Art, who helped authenticate the work.

Simon called the French provenance “speculation, but informed speculation,” adding that the earliest written record of its ownership goes back to King Charles I of England 100 years after the piece was painted.

“It appears in an inventory after he’s executed,” Simon explained. “At that point, it’s described as being owned by the queen in Greenwich.”

Charles’ queen, Henrietta Maria of France, most likely inherited the painting and brought it with her to England as a dowry when she wed him in 1625, Wintermute said, explaining that it likely hung in her private bedchamber, he said.

But it was not recorded until 1949, when the newly formed Commonwealth took stock of Charles I’s assets and began divvying them up among the Crown’s many creditors.

“When he’s executed, he leaves enormous debt and all his personal property is recorded quite precisely,” Wintermute said.

The painting went to mason John Stone, but he was forced to return it after a few years.

“When the monarchy was restored 10 years later, under threat of death, everyone who had something from the Crown was required to return it,” Simon explained.

And so King Charles II of England regained his parents’ painting in 1660, later passing it to his brother and successor, King James II.

But James II had no legitimate heirs, which frustrated historians’ attempts to track the painting after his death, according to Wintermute.

Likely, James II’s illegitimate daughter, Catherine, inherited the Leonardo, because it wound up in the collection of her husband, John Sheffield, duke of Buckingham — who famously built Buckingham Palace.

But before it got its palatial moniker, Buckingham House — as it was known when first erected in 1703 — was home to the “Salvator Mundi,” according to Wintermute.

At 200 years old, the painting had likely begun to show its age, and unsophisticated restorationists began filling in cracks in the wood with putty and attempting to touch up the masterwork.

“It may have had heavy overpaint on it even in that time,” Wintermute said of its days hanging in the future epicenter of British monarchy.

But it was still recognizable as a Leonardo in 1763, when Sheffield’s son, Sir Charles Herbert Sheffield, sold it as “L. Da. Vinci A head of our Saviour.”

It went for the equivalent of about $500 in today’s money.

The painting disappeared for 150 years, and when it re-emerged, it was nearly unrecognizable thanks to maladroit touch-ups that obscured Leonardo’s masterful hand.

The work surfaced in 1900, when British collector Sir Francis Cook bought the lost Leonardo, then attributed to his student Bernardino Luini, from Sir John Charles Robinson.

It passed through four generations of the Cook family, who misidentified it as having been done by Leonardo acolyte Giovanni Antonio Boltraffio, according to Christie’s.

When World War II erupted, and German bombers thundered over London, the Cooks evacuated.

They left the painting behind thinking it had little value.

“All the important pictures were evacuated to Wales,” Simon said. “They said, ‘Let’s not bother about that picture.’ It was thought to be so unimportant that they put it in the basement. The house was bombed and it survived. It was completely luck that this painting survived.”

Then in 1958, four generations after his family acquired it, Sir Francis Ferdinand Maurice Cook sold the painting through Sotheby’s as a “Boltraffio” for the equivalent of $90 to a private collector from Louisiana.

It remained there until New York art collector Alex Parish picked up the piece on behalf of an art consortium for $10,000 in a 2005 estate sale.

“I think it was so cheap and they thought that, even if it was it was a Leonardo copy, it would be worth substantially more than they paid for it,” Wintermute said.

That’s when the fates of “Salvator Mundi” reversed.

The group hired NYU conservator Dianne Dwyer Modestini in 2007 to scrape off “crude layers of old repainting,” Wintermute said.

Over the next six years, Parish and his partners showed it to experts at the Metropolitan Museum of Art and the National Gallery in London.

The painting was officially identified as a Leonardo for the first time in more than a century when the National Gallery in Washington, DC, exhibited it with full attribution to the artist in 2011, according to Christie’s. That was also “probably the first time it had been exhibited ever to the public,” Wintermute said.

Two years later, Parish and crew sold it to Swiss dealer Yves Bouvier for $80 million — 8,000 times what they paid for it.

Bouvier cashed in even faster, selling it that year for $127 million to Russian billionaire Dmitry Rybolovlev. He is currently suing Bouvier for allegedly overcharging him for that and other works.

The Russian is unloading the work through Christie’s for a starting bid of $100 million.

Not everyone is sold.

Critics of the work say the painting’s hazy pedigree and high level of retouching make it practically worthless in their opinion.

“There’s so little of Leonardo there. From a commercial standpoint, I don’t think it has any value. I wouldn’t buy it at any price,” gallerist Richard Feigen told the Post, adding when pressed: “Well, $10 I could do.”

Wintermute chalked any negative reactions up to jealousy.

“I think haters are gonna hate. It’s honestly almost entirely ignorant gossip” Wintermute said. “It’s going to sell for a lot of money, and that I think does bring out the competitive instincts in some members of the art community.”

Meanwhile, New Yorkers lined up outside the Midtown auctioneer Tuesday hoping to catch a glimpse of the newly rediscovered masterwork for fear it will go to a private collector and disappear once again from the public eye.

“This is the last day. It’s a once-in-a-lifetime opportunity, because a Chinese or a Russian oligarch will snatch it up,” Gabriella Morvay, 49.

“I hope whoever buys it donates the painting to a museum. It’s the noble thing to do. People from all over the world are coming to wait in line to see this.”

Additional reporting by Elizabeth Rosner

This story originally appeared in the New York Post.