The Iranian girls' football team is to be allowed to play in the Youth Olympics after a deal was reached to allow them to cover their hair.
Football's governing body Fifa had banned them from playing in headscarves, for safety and to keep religious statements off the pitch.
But Iranian sports bodies have now agreed the girls can wear caps that cover their hair but not their necks.
They are due to participate in a tournament in Singapore in August.
"We are very happy," Farideh Shojaei, deputy head of Iran's football federation, was quoted by the Associated Press as saying.
He said the decision had "increased the inspiration" of the team of under-15 year-old players.
"They are determined to practice more and more," he added.
"This decision was taken after both the Iran Football Federation as well as the Iran National Olympic Committee confirmed in writing that they will accept a solution whereby the players will not wear their Islamic hijab during the matches of the competition," Fifa said in a statement.
"Instead, the players can wear a cap that covers their heads to the hairline, but does not extend below the ears to cover the neck."
Fifa had initially banned the team from competing, as they had refused to play without headscarves, which are part of the Islamic dress code enforced by the Iranian authorities.
The Iran girls team is due to compete in a six-nation tournament at the first ever Youth Olympics, scheduled for 12-25 August in Singapore.
Around 3,600 athletes aged 14-18 will compete in 26 sports at the Games.