Gregory Shamus via Getty Images Kacey Bellamy, left, Meghan Duggan and Monique Lamoureux grab on to the championship trophy after beating Canada, 3-2, in overtime in the gold medal game in Plymouth, Michigan.

The U.S. women’s national hockey team became the world champions Friday at the International Ice Hockey Federation’s Women’s World Championship in Plymouth, Michigan. U.S. forward Hilary Knight scored the winning goal in overtime, ending the game with a 3-2 lead over Canada.

The team’s stunning victory came less than two weeks after it won a more personal battle against USA Hockey, the sport’s national governing body, over fair pay for female players.

Hilary Knight wins it in OT for 🇺🇸 pic.twitter.com/ttMtJe9BW3 — CJ Fogler (@cjzero) April 8, 2017

More than a year of private negotiations between the U.S. women’s national team and USA Hockey reached a boiling point in mid-March when the team threatened to boycott the women’s world championships if its requests for a “livable wage” and adequate financial support were not met.

The players had claimed that the national federation provided the women with only small monthly stipends over a six-month Olympic training period and did not pay players at all for the other three and a half years of each Olympic cycle. They also argued that the federation’s financial support for the men’s team ― including marketing, travel and developmental programs ― was significantly larger than for the women’s division.

For example, the women’s team argued that USA Hockey spent $3.5 million annually on its national team program for boys, yet the girls’ division received no “comparable support.”

USA Hockey initially disputed the women’s claims and began searching for athletes to replace members of the women’s team. But, nearly two weeks after the women had launched their boycott, USA Hockey and the women’s team reached a deal ― one day before the championships began.

The team has now won eight of the last 10 world championship medals, according to IIHF’s website.

“Our sport is the big winner today,” Meghan Duggan, the team’s captain, said after they settled their negotiations. “We stood up for what we thought was right, and USA Hockey’s leadership listened. In the end, both sides came together.”

Gregory Shamus via Getty Images Kacey Bellamy (No. 22) of the U.S. celebrates a third-period goal with Hilary Knight.

Hockey USA and the women’s team agreed to keep the financial terms of their deal private. Under the agreement, which covers the next four years, the federation will form a new advisory group made up of current and former players that will assist the federation in efforts to advance both girls’ and women’s hockey.

Knight, the U.S. forward who scored Friday’s winning goal, was vocal about the women’s fight for fair pay throughout the battle.

“The thing that gives us the most pride, I have to say, is knowing that we set a foundation for the younger generations to build upon,” Knight told the Edge of Sports podcast Tuesday. “That’s something I’ll be most proud of when I can take a second to really appreciate that, years down the line. We did it.”

CORRECTION: An earlier version of this story stated that the U.S. women’s hockey team deal covered a five-year period that included the 2020 Olympic Games in Tokyo and the 2019 FIFA Women’s World Cup. Their deal covers the next four years and does not involve either of the aforementioned events.