The Spanish Cabinet approved a draft law that grants workers the right to take paid sick leave due to severe menstrual pain.
If Parliament also approves the bill, Spain would become the first European country with such a law.
South Korea and Indonesia are among only a handful of countries around the world that allow paid menstrual leave.
"We are making a law that will ensure that women can live better," Spanish Equality Minister Irene Montero told reporters after a Cabinet meeting.
"It's an end to working in pain and popping pills," Montero added.
What we know about the bill
Workers experiencing period pain will have the right to stay home as long as they need. A doctor consultation will be required to estimate the leave period.
The law would cost the Spanish government, not employers, some €23.8 million ($25 million) per year.
The legislation is part of a broader reproductive health reform that is set to also include changes to Spain's abortion laws.
"We are advancing feminism. Women should be able to decide freely about their lives," Spanish Prime Minister Pedro Sanchez wrote on Twitter.
Path from bill to law
The draft bill will go to a public hearing before another reading in the Cabinet and a vote in the lower house of Parliament. Observers have said it won't be presented for a vote in Parliament before the end of the year.
Besides the length of the process, several politicians and unions of different ideologies have expressed reservations about the bill.
It's not yet clear if Sanchez's Socialist minority coalition government has enough support in the assembly to pass it.
Economy Minister Nadia Calvino warned the regulation could "stigmatize women" and put them at a disadvantage when competing for jobs.
Cristina Antonanzas, deputy secretary-general of one of Spain's largest trade unions, the UGT, also warned that the measure could impact "women's access to the labor market."
"You have to be careful with this type of decision," she said.
The United We Can party, the junior member of the left-wing coalition government, is the driving force behind the bill.
The government has made women's rights one of its political banners since it came to power around four years ago. Eight men and 14 women occupy ministerial positions in the Spanish Cabinet.