Updated | Iceland has become the first country in the world to make it illegal for women to get paid less than men.

New legislation was passed Monday that would fine companies and government agencies with at least 25 employees who fail to obtain government certification of equal-pay policies. Officials had already agreed to end the gender pay gap by 2022. The new law, however, would close that gap even sooner by holding companies themselves responsible for equal pay.

“It’s a mechanism to ensure women and men are being paid equally,” Dagny Osk Aradottir Pind, a board member of the Icelandic Women’s Rights Association, told Al Jazeera. “We have had legislation saying that pay should be equal for men and women for decades now, but we still have a pay gap.”

Ahead of the legislation Monday, Iceland already was considered the world’s most gender-equal country for nine years, according to the World Economic Forum. The group’s Global Gender Gap report found that the country had nearly closed more than 70 percent of its gender gap.

“Women have been talking about this for decades, and I really feel that we have managed to raise awareness, and we have managed to get to the point that people realize that the legislation we have had in place is not working, and we need to do something more,” Aradottir Pind said. 

The legislation was backed by both political parties in the country’s parliament, where women make up 50 percent of its lawmakers. In 2016, women in the country made 14 to 18 percent less than men, according to the World Economic Forum.

Officials first proposed the new law on International Women’s Day, in March.

“We need to make sure that men and women enjoy equal opportunity in the workplace,” Thorsteinn Viglundsson, equality and social affairs minister, said in March. “It is our responsibility to take every measure to achieve that.”

The World Economic Forum report listed the U.S. as No. 49 for gender equality, a decline for the nation that had reached the 45th spot the prior year. Since 2006, the group revealed that gender equality worsened for the first time in 2017. 

Despite improvements in some countries, women around the world are still struggling for equal pay, even as income levels increase. The Pew Research Center reported in October that women still make 83 cents on a man’s dollar. The center found that women are still burdened by declining wages due to work-life balance, gender discrimination in the workplace and a lack of acceptance in male-dominated circles. 

It’s no surprise to some that Iceland is the first country to make strides in equal pay. The country not only has a parliament in which half of the legislators are female, but it also has a new female prime minister, Katrin Jakobsdottir. The country had its first female prime minister, Jóhanna Sigurðardóttir, in 2009 and its first female president in Vigdís Finnbogadóttir in 1980. 

Senator Bernie Sanders praised Iceland for establishing equal pay Tuesday, demanding that the U.S. do the same. 

“We must follow the example of our brothers and sisters in Iceland and demand equal pay for equal work now, regardless of gender, ethnicity, sexuality or nationality,” Sanders said in a Facebook post. “As we fight back Republican efforts to revert women’s rights to second-class, it is important to not lose sight that our real goal is to move forward and expand women’s rights.” 

Celebrities including actress Patricia Arquette and former professional tennis player Billie Jean King applauded Iceland on Twitter. 

"Iceland again leading in the equality movement," Jean King tweeted. "Equal representation benefits everyone!" 

This article has been updated to include comments from social media.