In 1878, the Japanese ambassador to Russia, Enomoto Takeaki, was received in a formal audience in Saint Petersburg by Persian King Nasser al-Din Shah Qajar. However, formal diplomatic relations were not established until 1929. A Treaty of Amity was signed between Iran and Japan in 1939, and cordial relations were maintained during World War II until 1942, when the Allies invaded Persia. Formal diplomatic relations were restored in 1953 after the signing of the Treaty of San Francisco.