A book written by two Masons, Christopher Knight and Robert Lomas, entitled The Hiram Key reveals some important facts about the roots of Freemasonry. According to these authors, it is evident that Masonry is a continuation of the Templars. Though, in addition to this, the authors also examined the origins of the Templars.
According to their thesis, the Templars underwent a great change while they were in Jerusalem. In the place of Christianity, they adopted other doctrines. At the root of this lies a secret that they discovered in the temple of Solomon in Jerusalem, whose ruins they had set out to investigate. The writers explain that the Templars used their purported role as protectors of Christian pilgrims visiting Palestine as a pretense, but that their real aim was quite different:
éThere is no evidence that these founding Templars ever gave protection to pilgrims, but on the other hand we were soon to find that there is conclusive proof that they did conduct extensive excavations under the ruins of Herod’s Templeé 
The authors of The Hiram Key were not the only ones who found evidences of this. French historian Gaetan Delaforge makes this similar contention:
The real task of the nine knights was to carry out research in the area in order to obtain certain relics and manuscripts which contain the essence of the secret traditions of Judaism and ancient Egypt. 
At the end of the nineteenth century, Charles Wilson of the Royal Engineers, began conducting archeological research in Jerusalem. He arrived at the opinion that the Templars had gone to Jerusalem to study the ruins of the temple. Wilson found traces of digging and excavation under the foundations of the temple, and concluded that these were done by tools that belonged to the Templars. These items are still in the collection of Robert Brydon, who possesses an extensive archive of information concerning the Templars. 
The writers of the Hiram Key argue that these excavations of the Templars were not without result; that the order discovered in Jerusalem certain relics that changed the way they saw the world. In addition, many researchers are of the same opinion. There must have been something that led the Templars, despite the fact that they had previously been Christian and came from a Christian part of the world, to adopt a system of beliefs and a philosophy so completely different from that of Christianity, celebrate heretical masses, and perform rituals of black magic.
According to the common views of many researchers, this “something” was the Kabbalah.
The meaning of the word Kabbalah is “oral tradition.” Encyclopedias and dictionaries define it as an esoteric, mystical branch of Jewish religion. According to this definition, the Kabbalah investigates the hidden meaning of the Torah and other Jewish religious writings. But, when we examine the matter more closely, we discover that the facts are quite something else. These facts lead us to the conclusion that the Kabbalah is a system rooted in pagan idolatry; that it existed before the Torah, and became widespread within Judaism after the Torah was revealed.
This interesting fact about the Kabbalah, is explained by just as interesting a source. Murat Ozgen, a Turkish Freemason, maintains the following in his book, Masonluk Nedir ve Nasildir? (What is Freemasonry and What is it Like?):
We don’t know clearly where the Kabbalah came from or how it developed. It is the general name for a unique, metaphysically constituted, esoteric and mystical philosophy particularly connected with Jewish religion. It is accepted as Jewish mysticism, but some of the elements it contains show that it was composed much earlier than the Torah. 
The French historian, Gougenot des Mousseaux, explains that the Kabbalah is actually much older than Judaism. 
The Jewish historian, Theodore Reinach, says that the Kabbalah is
“a subtle poison which enters into the veins of Judaism and wholly infests it.“ 
Salomon Reinach defines the Kabbalah as
“one of the worst aberrations of the human mind.” 
The reason for Reinach’s contention that the Kabbalah is “one of the worst aberrations of the human mind” is that its doctrine is connected in large part with magic. For thousands of years, the Kabbalah has been one of the foundation-stones of every kind of magic ritual. It is believed that rabbis who study the Kabbalah possess great magical power. Also, many non-Jews have been influenced by the Kabbalah, and have tried to practice magic by employing its doctrines. The esoteric tendencies that took hold in Europe during the late Middle Ages, especially as practiced by alchemists, have their roots, to a great extent, in the Kabbalah.
The strange thing is, that Judaism is a monotheistic religion, incepted with the revelation of the Torah to Moses (peace be upon him). But, within this religion is a system called the Kabbalah, that adopts the basic practices of magic forbidden by the religion. This substantiates what we have presented above, and demonstrates that the Kabbalah is actually an element that has entered Judaism from the outside.
But, what is the source of this element?
The Jewish historian Fabre d’Olivet says that it came from Ancient Egypt. According to this writer, the roots of the Kabbalah stretch back to Ancient Egypt. The Kabbalah is a tradition learned by some of the leaders of the Israelites in Ancient Egypt, and passed down as a tradition by word of mouth from generation to generation.  (For further reading, see “Global Freemasonry” by Harun Yahya)
 Christopher Knight and Robert Lomas, “Hiram Key: Pharoahs, Freemasons and the Discovery of the Secret Scrolls of Jesus“, Arrow Books, 1997, p.37
 C. Wilson, The Excavation of Jerusalem, Christopher Knight, Robert Lomas, Hiram Key: Pharoahs, Freemasons and the Discovery of the Secret Scrolls of Jesus“, p.38
 Murat Ozgen Ayfer, Masonluk Nedir ve Nasildir? (What is Freemasonry and What is it Like?), Istanbul 1992, pp.298-299
 Gougenot des Mousseaux in Le Juif, La Judaésme et la Judaésation des Peuples Chrétiens, 2nd edition, 1886, p. 499
Harun Yahya is a prominent Turkish intellectual.
Buy the relevant / Harun Yahya’s book (s) now:
The Templar Tradition in the Age of Aquarius
– by Gaetan Delaforge
Secret Societies and Subversive Movements
– by Nesta H. Webster