Shirin Gerami, a 24-year-old woman from Iran, has made history by becoming the country's first female triathlete to have taken part in the sport's world championship.

By racing in the London event, she paved the way and set a precedent for thousands of Iranian women who have previously been denied permission to race in triathlons abroad or swim in international events.

Iran's president, Hassan Rouhani, greeted her achievement by tweeting: "Shirin Gerami,1st female triathlete to have participated in world championship wearing Iran's colours #GenderEquality."

Gerami raced in full Islamic dress after Iran's sports ministry issued required paperwork in the last hours before the final began.

The Islamic republic's state news agency, Irna, quoted Mohammad-Ali Sabour, the head of Iran's national triathlon federation, saying that Gerami had secured an official blessing and was nominated after the International Triathlon Union (ITU) agreed to set up a tent where she could change into her cycling and running clothes after swimming.

In her first interview before the grand final, Gerami on Thursday told the Guardian she received the go-ahead after spending four months trying to persuade the Iranian authorities that she wanted to respect their Islamic requirements.

"Triathlon … is still not very established in Iran; to date women do not participate in triathlons," she said.

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

She insisted 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."