A 24-year-old woman from Iran will this weekend make history in London by becoming the first female triathlete to take part in a world championship under the green, white and red tricolour of the Islamic republic's flag.

Shirin Gerami will join 8,500 athletes from 83 countries taking part in the PruHealth world triathlon grand final in Hyde Park, competing in full Islamic dress through a 1,500 metre swim, a 40km bike race and 10km run.

Gerami, who lives in Britain, wrote to the authorities at Iran's ministry for sports and youth affairs four months ago, attempting to persuade them that Iranian women could compete in the triathlon. She travelled to Iran a few weeks ago to push her case. "When I turned up in person on their doorsteps, they realised that I am very serious, and I am willing to do anything," she told the Guardian in an interview from Tehran, one day before flying back to London. "I was overwhelmed by how far people went in order to support me."

Officials at Iran's national triathlon federation told Gerami this week that she can participate in the London event. She will be competing in a full hijab that will cover her body from head to toe, a dress she has worked on to make sure it meets Iran's requirements. Organisers of the London grand final have also agreed to provide a tent for her to be able to change clothes as soon as she gets out of the water.

Gerami said her few months' struggle had been "one of the most surreal, enriching, enlightening experiences" of her life. "I can safely say I am a different person because of it. Everything in life has its ups and downs, and I'm not claiming that it has been all easy," she said. "The most important lesson was that I should always be sincere, always believe in my dream, and never, never give up."

She added that she wanted to share the triathlon with her fellow Iranian women. "Triathlon … is still not very established in Iran, to date women do not participate in triathlons," she said.

"I wanted to share triathlon, therefore, all the empowerment it has given me, with others and encourage others to experience and benefit from something that is dear to me."

By representing Iran, Gerami said, she wanted to tell "the other story of Iran", that positive stories about her home country do exist.

"I wanted to show that what people dismiss as impossible, is actually possible and this universal rule applies to all countries, to all people," she said. "What kept me going was that Iran's triathlon federation never said no.

"They would point out the issues, but they never shut the door on my face. They would always respond positively when I went back with a solution. For that, I am very grateful."

She added: "At times it felt that the riddles would get more and more complex, but I like to believe that all riddles can be solved, and I therefore kept going."

Previously, Iran has prevented female swimmers from participating in overseas competitions. The Women's Islamic Games in Tehran is one of the few international events where domestic swimmers are permitted to take part.

Women in Iran can use public swimming pools at gender-segregated times, or women-only sections, but sports officials have previously been reluctant to allow them into open waters.

It is not clear if the change of heart over Gerami has anything to do with the new administration of the moderate president, Hassan Rouhani, who took office last month.

Gerami's fight for recognition by the authorities follows the case of Elham Asghari who in June swam 20km in full Islamic dress in the tidal waters of the chilly Caspian sea in northern Iran. However, the authorities denied her record-breaking nine-hour feat, saying her "un-Islamic attire" was unacceptable.

Asghari, 32, has said despite designing a special swimsuit to put on while swimming, which added some 6kg to her weight in water, Iran's sports authorities refused to recognise her achievement. But in order to make her frustration heard by the officials, Asghari publicised her plight by releasing a video online which was viewed by thousands of viewers. "Swimming is not exclusively for men – we ladies do well too," she said in the video. Iranian authorities appeared particularly worried about how female athletes' bodies appeared as they came out of the water in wetsuits.

Unlike Asghari, Gerami has not complained about the difficulties of wearing her gear. "What prompted me to make a dress is because if I wanted to represent Iran, if I wanted to be racing under their name, then I have to respect its values and beliefs," she said.

"What is going to be different is that I will be climbing out in to a tent where I can change into my cycling and running clothes - I guess I won't have other people's stuff to trip over in transition, so I'm gonna treat that as a bonus."

The International Triathlon Union said it considers gender equality as very important and has supported Shirin Gerami in her triathlon journey.

Marisol Casado, the International Triathlon Union's president, said: "ITU is extremely happy and proud to support Shirin in her triathlon journey. She has displayed incredible courage and tenacity this week, which speaks volumes of her."

She added: "ITU and our partners at UpSolut worked with Shirin to create specific clothing that she is both safe and comfortable in, as well as a portable changing room in the transition area where she can change into different attire for the differing triathlon disciplines."

Casado said Iran's sports ministry has shown support for Gerami and with that she was able to be registered for the grand final but the president said she was unable to confirm whether Iran's national triathlon federation has given its final approval.