They were one of the most powerful organizations in the world at their time, controlling wealth and military arms across the world. The Knights Templar were the first Christian religious military order, eventually growing to be one of the first international banking organizations, a massive military arm in the Holy Land, and the fodder for conspiracy theorists for literally hundreds of years.
The Knights Templar were established during the Crusades, largely because of the state of the Holy Land after the First Crusade. Military campaigns launched from 1095 to 1099 had secured small Christian kingdoms in and around Jerusalem, but these Christian enclaves didn’t have the strength of arms to properly hold their territory, let alone to protect pilgrims coming to the holy sites.
And so a small group of French knights banded together to protect pilgrims on the road. King Baldwin II of Jerusalem learned of this and offered them rooms in the royal palace, formerly the Temple of Solomon. This small group grew into the Poor Knights of Christ and of the Temple of Solomon.
Their duties protecting the pilgrims would become much easier, they knew if pilgrims weren’t carrying their life savings on their backs, and so the knights looked for a new method of finance.
What if, instead of having pilgrims bring all the cash and valuables they would need, pilgrims were able to deposit most of their money in Europe as they set out and then pick up a commensurate amount of money in the Holy Land after arrival. They established a program to do exactly that, turning the Knights Templar into the first international bank.
Their wealth and status grew, and they eventually received official sanction from Pope Innocent II in 1139 who not only said it was fine that a religious order had taken up military arms, but that the knights would be subject to the authority of the pope and the pope alone.
But the papal bull protecting the knights also set standards of conduct for them, requiring that they remain poor, live in dormitories, not raise children or embrace women, gamble, swear, or take part in many other activities, similar to monks. But, where monks were expected to spend much time reading and no time fighting, Templars were expected to train and fight while not being required to read.
As the Templars grew, they took on larger roles as a true military force, eventually growing into a sort of police/military force with a strong command structure and outposts across the Christian kingdoms.
But, unfortunately for them, the 13th Century went badly for Christians as new Crusades failed and Christian kingdoms were retaken by the sultans. The city of Acre was the last Crusader stronghold, and it fell to Muslim armies in 1291.
They were accused of heresy, sodomy, and other crimes in the late 1200s and early 1300s, and European rulers jealous of the order’s wealth and power eventually decided to seize Templars and divvy up their assets. Much of the Templars’ massive financial assets were handed over to the Knights Hospitallers, but some was kept by rulers like French King Philip IV who used it to refresh his own coffers.
The Knights Hospitallers, a religious order focused on providing medical services, was slightly older than the Knights Templar, but the Knights Hospitallers had acquired a military mission similar to that of the Knights Templar in the 12th Century, and so it was an obvious heir to the Templar wealth.