Use of anointing oil in Old Testament times
The main purpose of anointing oil in the Old Testament times was to sanctify and set a part the anointed thing or person as “kadosh” or holy. Initially we have Biblical records of cases where anointing oil was only used for priests and tabernacle items, but then it was extended to include kings.
For example, we see where Samuel took the vial of oil and poured it on Saul’s head, and said, “It is the Lord, that anointed you.” Even though it was extended for this use, there were still several restrictions on those who could use anointing oil.
It was forbidden for an outsider or foreigner to use anointing oil and the Biblical laws stated that it should not be used on the body of the common man. The Lord instructed Moses to add spices including sweet spices, onycha, stacte, pure frankincense and so on to create an incense, a perfume seasoned with salt, pure and holy.
This was to be a symbol of God’s presence in The Temple and during sacrifices and anyone who replicated this “recipe” was to be cut off.
In Israel, anointing oil was sacred, and even though olive oil in general was used for nutrition, fuel for lamps, as an emollient even, the scented oil was always set apart as the anointing holy oil for the things of God.