Chile’s president Michelle Bachelet on Monday signed into law a bill that gives legal recognition to common-law marriages, including for people of the same sex, which the government says will provide benefits for some two million people.

The proposal to allow civil unions was introduced during the previous administration of ex-President Sebastian Piñera, and then taken up when Ms. Bachelet took office a little more than a year ago. The first civil unions are expected to take place before the end of the year, as there is a...