(AP) A handwritten letter written by Albert Einstein warning of the dangers of growing nationalism and anti-Semitism years before the Nazis rose to power has been sold for nearly $40,000.

The Kedem Auction House says the previously unknown letter, brought forward by an anonymous collector, fetched $39,360 in bidding in Jerusalem on Tuesday night.

Einstein wrote the letter to his sister after going into hiding in 1922 following the assassination of Germany’s Jewish foreign minister by right-wing extremists. Police had warned the Jewish scientist that his life could be in danger too.

“Here are brewing economically and politically dark times, so I’m happy to be able to get away from everything,” he wrote.

Kedem says the letter was sold at roughly double its expected price.

More than a decade before the Nazis seized power in Germany, Einstein was on the run and already fearful for his country’s future, according to the letter.

His longtime friend and fellow Jew, German Foreign Minister Walther Rathenau, had just been assassinated by right-wing extremists and police had warned the noted physicist that his life could be in danger too.

So Einstein fled Berlin and went into hiding in northern Germany. It was during this hiatus that he penned a handwritten letter to his beloved younger sister, Maja, warning of the dangers of growing nationalism and anti-Semitism years before the Nazis ultimately rose to power, forcing Einstein to flee his native Germany for good.

“Out here, nobody knows where I am, and I’m believed to be missing,” he wrote in August 1922. “Here are brewing economically and politically dark times, so I’m happy to be able to get away from everything.”

As the most influential scientist of the 20th century, Einstein’s life and writings have been thoroughly researched. The Hebrew University in Jerusalem, of which Einstein was a founder, houses the world’s largest collection of Einstein material. Together with the California Institute of Technology it runs the Einstein Papers Project. Individual auctions of his personal letters have brought in substantial sums in recent years.

The 1922 letter shows he was concerned about Germany’s future a full year before the Nazis even attempted their first coup — the failed Munich Beer Hall Putsch to seize power in Bavaria.

Einstein renounced his German citizenship in 1933 after Hitler became chancellor. The physicist settled in the United States, where he would remain until his death in 1955.