The General Assembly voted 345 by 170 to instruct the Legal Questions Committee to prepare legislation with safeguards in accordance with Section 9 (1A) of the Marriage Scotland Act.
But commissioners agreed that the committee should only act if, in its opinion, said safeguards “sufficiently protect against the risks they identify”.
The committee will report its findings to the General Assembly of 2020.
The motion calling for legislation to be prepared was put forward by Rev Bryan Kerr, minister of Greyfriars Parish Church in Lanark.
It was amended to ensure the committee had the power to recommend withdrawal following a call from Rev Peter White of Sandyford Henderson Memorial Church in Glasgow.