Most of the Spain women’s team have agreed to end their boycott, says Spanish secretary of state for sports Victor Francos.
The agreement was reached at 05:00 local time on Wednesday after more than seven hours of meetings.
Two of the 23 players called up for this month’s Nations League games have chosen to pull out of the squad.
Francos said the Spanish football federation (RFEF) had committed to “immediate and profound changes”.
The players began the boycott after then RFEF president Luis Rubiales kissed forward Jenni Hermoso following Spain’s triumph over England in the Women’s World Cup final last month.
The kiss, which Hermoso said was not consensual, led to Rubiales’ resignation, while Spain manager Jorge Vilda was sacked.
Spain are due to play Sweden on Friday and Switzerland on Tuesday in the Nations League.
Francos, the head of the Spanish government’s national sports agency (CSD), said: “It is good news to be able to say that the team will play the next two games with guarantees.”
He said a decision was reached following “friendly” talks in Valencia involving the players, RFEF officials, CSD and women’s players’ union Futpro.
“A joint commission will be created between RFEF, CSD and players to follow up on the agreements, which will be signed tomorrow,” Francos said.
“The players have expressed their concern about the need for profound changes in the RFEF, which has committed to making these changes immediately.”
Francos said the players who have chosen not to play would not face sanctions and their decision was “absolutely respectable”. The players could have faced fines or a ban from the national side for not turning up for international duty.
On Monday new head coach Montse Tome selected 15 players who were part of the World Cup squad in her squad for the Nations League games.
After it was announced, the players published a statement saying the boycott remained in place and that they had been “put in a position in which we never wanted to be in”.
They said they intended to explore the potential legal implications of being called up against their wishes.
Tome omitted Hermoso from the squad “to protect her”.
Hermoso said selecting players who are boycotting the team showed “nothing has changed” at RFEF.
The CSD said a commission would be established to monitor the agreed changes, which will focus on equality policies, advances in equal pay and improving the infrastructure of women’s sport.
Futpro president Amanda Gutierrez said: “The players see it as a rapprochement of positions. The vast majority have decided to stay for the sake of this agreement.
“It is the beginning of a long road ahead of us.”
The Spain players travelled to the training camp in Valencia on Tuesday.
Asked by reporters at Barcelona airport how she felt about the situation, midfielder and two-time Ballon d’Or winner Alexia Putellas said: “Well, bad.”
Rubiales has been banned from going within 200 metres of Hermoso after she filed a legal complaint.
Appearing in court for the first time on Friday, Rubiales denied sexually assaulting Hermoso.