The acclaimed animated film Persepolis, tells how a young girl adapts to life in Iran after the 1979 Islamic revolution. One of the new rules for women was that they were no longer allowed to attend football matches. That was never crueller than last Saturday when 110,000 wildly animated men saw Tehran giants Persepolis win the title in the last minute of a season that would barely be believable if it was on the silver screen.

Perhaps the story of Persepolis FC in 2007-08 could be a sequel as is, in some ways, this piece. Last October the story was told of Afshin Ghotbi, an Iranian-American who, after spells as assistant coach of South Korea, returned to Tehran in August 2007 for the first time in 30 years to take over the nation's biggest club. You know what they say about sequels … but there are exceptions.

The start of the season was all wins, smiles and Star Wars, the middle part as dark as Empire Strikes Back but the end contained drama that blows Return of the Jedi out of the water and rivals the 1989 Anfield blockbuster. Persepolis went into the last match of the season in second place, two points behind leaders and final day visitors Sepahan.

Saturday is the first day of the working week in Iran but the giant Azadi Stadium was full long before the late afternoon kick-off and even the emergency exits were packed. Striker Mohsen Khalili volleyed Persepolis ahead after 17 minutes. Sepahan's highly-rated 18 year-old striker Ehsan Hajsafi silenced the masses 11 minutes later. The second half was all Persepolis but despite the pressure, possession and, increasingly, punts, few chances were created. Seven minutes' injury-time, an amount that had Sepahan's and Iraq's 2007 Asian Cup-winning boss Jorvan Vieira checking both his chunky watches, helped and after six, Sepehr Heidari headed home from close range to clinch a first title since 2003 and spark pandemonium.

Ghotbi almost didn't make it to the final match for two reasons. The first was that the American who could lead Iran almost left Persepolis to do so. On February 29, the deputy head of the Iranian Football Federation Medhi Taj told state television: "Ghotbi will coach the national team in the first round of the World Cup qualification games." A day later, two hours before Ghotbi's new job was to be officially announced, he was told it had gone to Iran's goalscoring legend Ali Daei. It was rumoured that the change was a result of Daei's establishment connections. Maybe the rumours were right as the ex-Bayern Munich striker told 90TV in Iran, a station whose viewers had overwhelmingly voted for Ghotbi earlier in the week, that he had lobbied God.

Perhaps Ghotbi's popularity worked against him in a nation where the government basically chooses the national boss. A hit with fans of all clubs – for his attacking football as well as his professionalism compared to most traditional Iranian managers – the 44-year-old was greeted as 'Afshin the Emperor' everywhere he went, not something likely to please Tehran's politicians.

Secondly, Ghotbi looked to be on his way out of the club in April but this time for less pleasant reasons. Persepolis went through the first 16 games of the season unbeaten but then everything started to go wrong. A defeat against Sepahan on December 31 was followed in February by a six-point deduction imposed by Fifa for non-payment of a former player.

More losses followed and title dreams were fading. At a club like Persepolis, there is always more to think about than results on the pitch, it is a club with more than its fair share of hashyeeh (side issues).

"The hashyeeh is unbelievable at Persepolis," Ghotbi told Iranian journalist Kaveh Mahjoob in April. "Some papers write quotes on behalf of players criticising their team-mates when such conversations never took place. Quotes have been attributed to me that I never made … also, let's say I hold a private conversation. The meeting ends and within 10 minutes a reporter calls me to ask about it. Big clubs like Manchester United and Real Madrid have similar pressures from fans and media but I doubt that such an information flow exists anywhere else."

There were elements in the club that felt that an Iranian-American should never have been appointed ahead of someone with Persepolis connections. Only good results kept them in check. One of 'them' is always rumoured to be former player and current assistant coach Hamid Reza Estili. Ghotbi's predecessor Mustafa Denizli certainly had problems with Estili in the 10 months the former Turkey manager was with the club. Ghotbi denied that his No2 was deliberately undermining him – kind of. "I have considered and treated Estili like a brother ... It is really strange for me to think that a Perspolis icon would work against his beloved club. I don't believe it."

Ghotbi worked under Guus Hiddink and Dick Advocaat in Korea and maintained his dignity at all times. Perhaps though, he was too lenient in his first season as head coach. When he did get tough, by firing one of Estili's 'gang' - conditioning coach Alireza Marzban - the club intervened and Marzban returned. The problems continued and there were rumours that some players weren't trying. Ghotbi's laptop was, in his words, "broken intentionally by someone from inside the club". Trips away brought no relief. On a flight to Shiraz, defender Sheys Rezaei's idea of announcing on the intercom that the plane was about to undergo an emergency landing, went, unlike the aircraft, down badly. Rezaei said it was a joke and he wanted to scare star player Alireza Vahedi Nikbakht. Nikbakht, in turn, scared Ghotbi by appearing on television to say that the coach's methods were old-fashioned and that he didn't understand modern football.

Both players were finally disciplined by Ghotbi, who had nothing to lose. Trailing Sepahan by seven points with seven games left, Persepolis faced a make-or-break game against Malavan. The win was a turning point and the Reds collected 14 points from the next six games, a run which included a satisfying win at Saipa, the club still coached by Daei.

Persepolis were on a roll. Talking to Ghotbi the day before the final game, he predicted that the Reds would win the title in front of the "the best fans in the world". It was hard to argue and after the game, he breathlessly told the Iranian media: "I have not seen scenes like this in my entire life. I managed to find my way through the fans by jumping over them, and am extremely happy today to witness their emotions. I dedicate this Championship to the fans."

The advice of many journalists and friends to Ghotbi has been 'win, and then get out.' That may well happen. Sometimes there is no need for a sequel but if he stays, then who knows?