Freemasonry was brought to the Russian Empire by foreign officers in the Russian service. For instance, James Keith is recorded as being master of a lodge in Saint Petersburg in 1732–34. Several years later his cousin John Keith, 3rd Earl of Kintore was appointed Provincial Grand Master of Russia by the Grand Lodge of England. In the early 1770s, Ivan Yelagin succeeded in reorganizing Russian Freemasonry into a far-reaching system that united some 14 lodges and about 400 government officials. He secured English authorization of the first Russian Grand Lodge and became its Provincial Grand Master. Most Russian lodges were attracted to the Swedish Rite. In 1782, Ivan Schwarz represented Russia at the masonic congress in Wilhelmsbad (a health resort in Hanau), where Russia was recognized as the 8th province of the Rite of Strict Observance. See History of Freemasonry in Russia for further details.