This year the Sydney Gay and Lesbian Mardi Gras Parade made its way along Oxford Street for the 40th year in a row.

It was a typically loud, colourful and vibrant affair that mixed politics with partying, raunch with glamour and commemoration with celebration.

The story of how it all began — a street party violently shut down by police, resulting in a riot and dozens of arrests — is well documented.

But there are many lesser-known stories, including the events of 2002, when the seemingly unstoppable Mardi Gras machine came to the brink of financial disaster and total collapse.

"The carnival may be over for Sydney's Gay & Lesbian Mardi Gras" ran the headlines at the time. "Gay abandon — Mardi Gras on the rocks."

While some in the LGBTIQ community argued that the event had served its purpose and should be allowed to fade away, one group of volunteers rolled up their sleeves and got to work to save it.

So what happened?

A one-off event on a chilly winter night in 1979 eventually transformed into the annual Mardi Gras parade. ( Supplied: Robert French )

Ever since a disco was held at the Paddington Town Hall on Mardi Gras night in 1980, the parade and festival had been largely funded by dance parties.

By the end of the '90s, those parties were held twice a year — one after each year's parade and one, called Sleaze Ball, each September or October. And they were massive.

Historian Robert Reynolds told The History Listen about the rush on tickets.

"There'd be these controversies about whether people who weren't identified as gay or lesbian should go. You had to get in early, you had to make sure you got your ticket because you didn't want to be left stranded," he said.

World famous DJs pumped out dance beats to crowds in the tens of thousands. Every party sold out. The money flowed in and looked like it always would.

These were years in which lesbian and gay life in Australia seemed to hit the mainstream.

'Big battles had been fought'

The massive 1989 Mardi Gras Party in Sydney. ( Supplied: Sydney Gay and Lesbian Mardi Gras )

The last state to decriminalise male homosexuality, Tasmania, did so in 1997. Anti-discrimination legislation provided a range of protections to lesbian and gay people and recognition of same-sex relationships had increased.

Many in the community were cautiously optimistic that the worst years of the AIDS crisis were over.

More TV shows, movies and out musicians were giving increased representation to queer people. There were good reasons to hit the dance floor and celebrate.

But once that success had been celebrated, was there a need to keep celebrating?

David Mills was a journalist with the gay newspaper the Sydney Star Observer at the time, and says the community was "caught between moments".

"We were still a long way from the push for same-sex marriage, which really took another 10 years to take root here in Australia," he said.

"So we had a couple of years there where the big battles had been fought, we thought that we were reasonably equal, and there was that sense of — what now? Do we just move out to the suburbs? Where does the fight go?"

A Mardi Gras poster dating back to 1981. ( Supplied: Sheona White, printed by Lucifoil Posters )

From the mid-1990s onwards, some commentators began to use the phrase 'post-gay'.

Professor Reynolds explains that they were describing "this sense that being gay was one identity strand amongst a number for any individual".

"And that there was less and less of a need to organise politically or socially around a sexual identity because it was becoming more and more mainstream".

The internet had also emerged as a new space through which to party, date or hook-up.

The seemingly cohesive community moment of the late 1990s splintered as a range of websites, apps and alternative spaces presented new opportunities to explore, leaving the Mardi Gras dancefloor looking a little dated.

Was it time to 'let it go'?

The 2001 Mardi Gras party was the first in 10 years not to sell out. The 2001 Sleaze Ball didn't sell out either. It seemed the attraction of large-scale events exclusively for the LGBTIQ community was fading.

The drop in local sales aligned with a series of other challenges to the financial success of Mardi Gras parties, on both the local and global stage.

The devastating events of 9/11 led to a rapid decline in international tourism, including Mardi Gras' usually reliable influx of American visitors, and to significant belt-tightening by corporate sponsors.

The government sale of the Royal Hall of Industries and the Hordern Pavilion — the sites of Mardi Gras parties since the early 1980s — led to a sharp rise in venue costs.

In 2002, sales for the Mardi Gras parade plummeted. ( Supplied: Norman Edwards (designer) C.Moore Hardy (photographer) / Sydney Gay and Lesbian Mardi Gras )

But although dance parties were less reliable sources of funding than they once had been, other options were hard to identify and more and more parties were planned.

Towards the end of 2001, Mardi Gras organisers were looking into the next year with trepidation.

The Gay Games was to be held in Sydney in November 2002 and organisers for that event had adopted a seemingly tried and tested fund-raising strategy — they would hold five dance parties of their own.

The competition to draw crowds would be intense.

The 2002 parade and party went ahead as usual, but sales for the party were down yet again. Organisers woke up with a serious hangover. Amid the pumping crowds of the late 1990s, any need to set money aside for difficult times had seemed unnecessary.

But now Mardi Gras was more than $500,000 in debt and creditors were circling.

The organisation could not continue in its current form. It was possible that the 24th Mardi Gras had been the last.

There were certainly some in the community who were happy to let Mardi Gras go.

Thousands of LGBTIQ people taking to the street had once seemed a brazen, radical and inherently political act. Was it still? Maybe once you'd seen one Mardi Gras parade, you'd seen them all.

"I wasn't the only one saying, 'Let it go. It's done its job, let it go'," Professor Reynolds recalled.

"There was a quote at the time, a gay activist saying 'Mardi Gras is absolutely central to gay life in Sydney, NSW and Australia'. And I just thought - is that the case?"

But for others in the LGBTIQ community, the survival of Mardi Gras seemed essential.

A rescue plan for Mardi Gras

Stevie Clayton was CEO of ACON, a HIV prevention group, at the time.

She was overseas at an AIDS conference in August 2002 when the news came through that Mardi Gras had gone into voluntary administration. When she got back she jumped into action.

"The journey to recovery began in my kitchen with a discussion between me and Pip Newling, then president of Queer Screen," she recalled.

"Together with ACON, the Gay and Lesbian Rights Lobby and Pride, we drafted a rescue plan."

A new organisation — called New Mardi Gras — was formed. Joining Ms Clayton as co-chair was Michael Woodhouse.

For them, and for the rest of the Phoenix Board, as it was known, there was no question about Mardi Gras' ongoing importance.

"It's like Christmas, it's like New Year," Mr Woodhouse said.

"It's a time when people come together to do things which are extraordinary, where new friendships are made, where new partners are made.

"Importantly, it was the time of year when some of the gay organisations and gay and lesbian businesses — pubs, clubs, newspapers — made a bit more money, and that actually kept them to be alive, and kept them to be important parts of the fabric of the community as we go forward."

A crisis meeting at Mardi Gras HQ in Erskineville, in June 2002 ( Supplied: Jamie Dunbar / Sydney Star Observer )

Ms Clayton and Mr Woodhouse took things back to basics.

"It was pretty rough and ready for those first few months. We were trying to work out what the immediate next step was and frankly who could help us," Mr Woodhouse said.

"I spent a lot of time having meetings and conversations with people I knew, people in the community, people who had rung to offer their help, reaching out to people right on the edge of my social networks to see who was in their networks that we could bring in to join committees and organise events."

In some ways, the organisation of the 2003 Mardi Gras echoed the days of the late 1970s and early '80s.

Each of these events only happened because of the dedicated work of a small group of volunteers. Old-fashioned, grass-roots organising was necessary — hats were passed around, favours were called in.

If Mardi Gras has sometimes been criticised for being too corporate and too dominated by big business, it was in this moment of crisis that the value of community was revealed.

Mardi Gras celebrated its 25th birthday in 2003 with a parade, party and festival pulled together in a remarkably short space of time thanks to some extraordinarily hard-working people.

It turned 40 this year amid a moment of great celebration for the LGBTIQ community.

People celebrate as the Yes result of the same-sex marriage postal survey is announced. ( Getty: Scott Barbour )

Same-sex marriage had finally been achieved and the victorious, if often bruising postal survey campaign had reminded many in the queer community of the ongoing need to fight for and protect their rights.

The 2018 Mardi Gras party sold out weeks in advance.

The efforts of Ms Clayton, Mr Woodhouse and other volunteers in 2003 ensured it was still alive when it was time to celebrate new victories.