A law allowing people over 16 to change their legally recognized gender without a medical exam has received final approval from the Spanish parliament.
The conclusion of a lengthy debate saw it pass with 191 votes in favor and 60 against.
The procedure to change a document's gender could theoretically take three to four months.
Thursday's legislation also includes paid menstrual leave for women who experience excruciating period pain.
In the past, changing one's gender on an ID card required a medical diagnosis of gender dysphoria and two years of hormone therapy.
They can now identify as a different gender and later, three months later, confirm it. While those between the ages of 14 and 15 require parental consent, those between the ages of 12 and 13 require a judge's approval.
Irene Montero, the minister for equality, told lawmakers prior to the vote that "trans people are not sick people, they are just people.".
After the law was passed, ending a 20-month parliamentary debate, she was seen grinning in front of congress.
But not everyone embraced the law. "We are here to support the rights of women as they are completely erasing us with these misogynist laws," one protester, Patricia Bilbao, said. ".
Denmark, one of nine nations on the continent with self-declaration systems, was the first in Europe to pass a law of this kind in 2014.
Sweden, which in 1972 became the first country to legalize gender transition in any way, recently prohibited hormone therapy and mastectomies for people under the age of 18.
The Scottish government passed a gender reform bill in January, but Westminster blocked it because it might have a "serious adverse impact" on UK laws already in place.
On Thursday, Spain passed a law granting women paid menstrual leave, making it the first nation in Europe to do so. Ms. Montero called it a legislature "of feminist conquests.". ".
According to the law, if a woman has a doctor's note, the state will pay for sick leave if she is experiencing severe period pain.
The UGT trade union is concerned that employers will favor hiring men, so it has encountered resistance.
Additionally, public hospital access to abortions was expanded, and minors can now receive the procedure at ages 16 and 17 without parental consent.
Additionally, menstrual and contraceptive supplies will be freely distributed in all high schools.