Godefroy de Bouillon was designated King of Jerusalem by his peers, a title he refused, preferring to bear that of Advocate of the Holy Sepulchre. He set up the Order of Canons of the Holy Sepulchre, whose mission was to help the Patriarch of Jerusalem with all the tasks. A certain number of men-at-arms, from the crusade, then put themselves at the service of the patriarch in order to protect the Holy Sepulchre.
A similar institution made up of knights, called knights of Saint -Pierre (milites sancti Petri), was created in the West to protect the property of abbeys and churches. These knights were lay people, but they enjoyed the benefits of prayers.
By extension, the men responsible for ensuring the protection of the property of the Holy Sepulcher as well as of the community of canons were called milites sancti Sepulcri.
It is highly probable that Hugues de Payns integrated this institution as early as 1115.
All the men in charge of the protection of the Holy Sepulcher lodged in the nearby Saint John of Jerusalem Hospital.
When the order of the Hospital, recognized in 1113, was charged with taking care of pilgrims coming from the West, an idea was born:to create a militia of Christ (militia Christi) which would deal only with the protection of the community of canons of the Holy Sepulcher and pilgrims on the roads of the Holy Land, prey to local brigands.
Thus, the canons would take care of liturgical affairs, the order of the Hospital of charitable functions and the militia of Christ of the purely military function of protecting pilgrims. This triangular distribution of tasks reproduced the organization of medieval society, which was composed of priests (oratores), warriors (bellatores) and peasants (laboratores).
This is how the order of the Temple, which at that time was called militia Christi, was born.