SANTIAGO (Reuters) - Chilean President Sebastian Pinera on Wednesday signed into law a bill allowing people over the age of 14 to change their name and gender in official records, marking a historic shift in a traditionally conservative, predominantly Roman Catholic country.

The bill was first introduced by center-left President Michelle Bachelet, then faced fierce lobbying by conservative and religious groups until its eventual passage by lawmakers in September, nearly five years later.

“I am aware there are varying opinions on this issue,” the center-right Pinera said in an official act celebrating the law’s passage. “But I am firm in my conviction that we have taken a step in the right direction.”

The law marks an increasingly progressive tack in Chile, an Andean nation until recently dominated by a conservative, Catholic culture.

Chile legalized divorce in 2004, making it one of the last countries in the world to do so. And the country’s ban on abortion, one of the strictest in the world, was lifted in 2017, though for special circumstances only.

The transgender bill signed into law on Wednesday defines gender identity as a personal conviction of whether a person sees himself or herself as male or female, irrespective of their physical state or the gender or name assigned to them in the country’s civic register.

Children aged 14 to 18 must first obtain the consent of their parents or legal guardians.

There are no official statistics for the number of trans people in Chile.