One of India's top women chess players has pulled out of an upcoming championship in Iran in protest at having to wear an Islamic headscarf. Soumya Swaminathan, a former world junior girls champion, said the dress code at the Asian Nations Chess Cup starting next month violated her rights. "I find the Iranian law of compulsory headscarf to be in direct violation of my basic human rights including my right to freedom of expression, and right to freedom of thought, conscience and religion," the grandmaster said. "It seems that under the present circumstances, the only way for me to protect my rights is not to go to Iran," the 29-year-old wrote on Facebook. In 2016, US chess champion Nazi Paikidze-Barnes boycotted the world championship in Tehran after also refusing to wear the hijab. In 2017 the Iranian Chess Federation banned Dorsa Derakhshani for attending competitions abroad without wearing the headscarf. She now plays for the United States. Since the Islamic revolution of 1979, Iran has required women to wear the Islamic headscarf in public places. Under Iranian law, women can only show their face, hands and feet in public and are supposed to wear only modest colours. Over the years, women have pushed back the boundaries of the law, with many, particularly in the capital, wearing loose, brightly coloured headscarves far back on their heads. But they still risk fines and even lashings from "morality police" if they go too far. Swaminathan criticised chess officials for allotting events to countries without taking players' rights into account. "I understand the organisers expecting us to wear our national team dress or formals ... for our games during official championships, but surely there is no place for an enforceable religious dress code in sports," she said. Swaminathan is ranked 97 among active women players in the world and fourth in India, according to the World Chess Federation. The Asian Nations Chess Cup takes place in Hamadan from July 27 to August 4.