Saudi Arabian judo fighter Wojdan Shaherkani has been cleared to wear a headscarf at the Olympic Games.
The International Judo Federation had said the 16-year-old must fight without the headscarf for safety reasons.
But since the Saudis threatened to withdraw Shaherkani, the federation changed their mind.
"This agreement shows that being a modest Muslim woman is no barrier to taking part in sport," a spokesman for the Saudi Olympic Committee said.
The headscarf is slowly being allowed in to other sports too.
It can be worn under the mask in fencing, wrapped tightly in an elasticated bun for weightlifting or styled into a cap for shooting.
It's hoped the change in rules will encourage more Muslim women to take part in sport.
London 2012 is the very first Olympic Games where every single country has entered at least one female competitor.