When the New South Wales government announced last weekend that it would not fund the controversial Safe Schools anti-bullying program, Tony Abbott was quick to broadcast his support.

“Good that NSW is scrapping so-called Safe Schools, a social engineering programme dressed up as anti-bullying,” he wrote on social media.

“This was a Gillard govt programme, not – REPEAT NOT – an Abbott govt one.”

In reality, the process of establishing the program, intended to help protect LGBTI students from bullying at school, was initiated by Labor, and contracts signed off just before the 2013 election. But the $8 million program was adopted, launched and rolled out by the Abbott government.

The new government could have done as it did with the carbon tax, the mining tax and many other inherited policies, and dumped Safe Schools. It didn’t. The program continued, unaltered and fully funded, through the entirety of Abbott’s prime ministership. Ergo it was an Abbott government program just as much as a Gillard one.

The former prime minister attempted to explain this awkward reality the next day on Radio 2GB, suggesting that was because he had for a long time been oblivious to this “terrible, terrible” program.

Christensen predicted the Safe Schools Coalition would reject the changes, and would in consequence lose its funding. He was wrong.

“Of course, lots of things happen down in the bowels of the bureaucracy that the people at the top of the system aren’t aware of,” he said. “As soon as we were aware of this thing, I spoke out against it.”

Or maybe not. Multiple well-sourced reports say Abbott was not only aware of Safe Schools throughout – he could hardly not have been – but also was initially untroubled by the program.

As reported in March last year by The Saturday Paper’s Karen Middleton, when some conservative MPs first raised in the party room in early 2015 objections to Safe Schools, then education minister Christopher Pyne defended it. And then prime minister Abbott spoke in support of Pyne.

This week, after Abbott’s implausible performance on the Ray Hadley show, more Liberal sources contradicted him. Guardian Australia reported on Monday that Abbott not only defended the program in that party room meeting but also “rebuffed” several attempts by then parliamentary secretary for education Scott Ryan to have Safe Schools defunded.

The available evidence does not back Abbott’s version. He did not become prominent among the opponents of the program until early last year, after Malcolm Turnbull had taken his job. The point of the anecdote is not just to suggest Abbott is an unreliable witness, but to highlight the fact that once a new front opens up in the culture wars, even experienced combatants can be caught off guard by its rapid escalation.

By the time Abbott began sounding off against Safe Schools, the scheme had become something more than an anti-bullying program. It stood for something much bigger in the minds of conservatives. Much as section 18C of the Racial Discrimination Act became a proxy for the broader issue of free speech, the Safe Schools program became a proxy for broader concerns about gender. It also got tangled in the issue of same-sex marriage.

“The two issues are definitely linked,” says Lyle Shelton of the Australian Christian Lobby.

“They travel together under the rainbow flag. If you are stripping the gender requirement out of the Marriage Act, it follows logically that you downplay gender in other areas of society.

“I think while ever the spectre of same-sex marriage looms you will see Safe Schools-type programs following, as night follows day. The two are part of the same ideology. We learnt from the situation in the US and Canada that once those pushing the rainbow political agenda achieved the stripping of the gender requirement from marriage they then pivoted to Safe Schools-type programs.

“You had the Obama so-called bathroom mandate, which allowed people of the opposite gender to identify whichever way they wanted and use the toilet facilities at school. They pivoted after they achieved political win [on marriage].”

A quick history of Safe Schools starts in 2010, with a La Trobe University study that found 75 per cent of same-sex-attracted people aged between 14 and 21 had experienced some form of homophobic bullying or abuse.

Eighteen per cent of those young people had been subjected to physical bullying, and 61 per cent to verbal abuse, because of their sexuality. The study found 80 per cent of them said it had happened at school. There were consequent effects on their mental health, too: they were vastly more likely to self-harm, contemplate or attempt suicide, to seek professional counselling, to underperform academically.

The program began as a collaboration between La Trobe University academics and the Foundation for Young Australians, designed to support teachers working with LGBTI students, their families and their problems. It started in Victoria and about three years later was taken up by the federal government. Organisations in other states subsequently tendered to become part of what was called the Safe Schools Coalition.

It was not until early 2014 that conservative Christian groups, Shelton’s ACL prominent among them, began seriously campaigning against the Safe Schools Coalition’s program. And it took about two years more for heat to build on the conservative side of federal politics.

By February 2016, it was at a fast boil, fired by the usual right-wing commentators on talkback radio, the Murdoch press and religious conservatives in the Liberal and National parties. The Daily Telegraph in particular campaigned against the program, joined by The Australian.

The Queensland MP George Christensen complained that the Safe Schools website included links that could be followed to “pornographic web content, sex shops, adult online communities and sex clubs” and raised “serious concerns about child safety”. Christensen likened the program to paedophilic grooming.

South Australian then Liberal senator Cory Bernardi complained in the party room that Safe Schools was a vehicle to “indoctrinate children into a Marxist agenda of cultural relativism”.

Tony Abbott joined those calling for Safe Schools to be defunded.

In late February, Turnbull announced a review of the program, to be conducted by Bill Louden, former dean of education and emeritus professor of education at the University of Western Australia. It was a quickie, reporting back just two weeks later and finding no major problems. He suggested some modest tweaks.

The critics were not mollified and just a week after that Education Minister Simon Birmingham announced a series of changes, restricting the use of some of the material on the web, cutting out external links, insisting on greater parental involvement, and moving the whole thing to a government website.

The changes went significantly beyond what Louden recommended but were far from radical. Still, they pacified some opponents.

Christensen, for example, pronounced Safe Schools “gutted of all its bad content”. He predicted the Safe Schools Coalition would reject the changes, and would in consequence lose its funding.

He was wrong. The central element of the program – providing educators with resources to allow them to better provide support and guidance for students understanding their sexual identities and struggling with prejudice – remained.

“There was a lot of insinuation that the Safe Schools program is in classrooms working directly with young people,” says Craig Comrie, the national director of the Safe Schools Coalition. “That’s untrue. Our focus was always teachers. Teachers are the critical players in creating safe environments at schools.”

At the end of June, federal funding for Safe Schools runs out. It was only ever a four-year contract.

Although Labor promised at the most recent election to kick in another $6 million to continue funding, Comrie says his organisation had long accepted it would likely have only a limited lifespan.

“We’ve known it for four years, from the time we signed the contract, so we’ve been planning for this for some time,” he says.

“We’ve already trained over 17,000 educators across the country. We will continue to do that work. We will be focusing all of our time on getting as many teachers educated as possible.”

Opponents of Safe Schools, meanwhile, shifted their attention to state governments, lobbying to try to ensure that they did not pick up the program after the federal money ran out. Until last weekend, they had not had much success.

The Labor governments in Victoria and the ACT already operate their own schemes, and will continue to do so after June 30.

“In Western Australia the incoming [Labor] government made a very clear campaign commitment to the program, when federal funding ceases,” Comrie says.

When NSW Education Minister Rob Stokes announced on Sunday that his state would not continue the program after June 30, however, it was a big deal for its opponents. A day later, Tasmania followed suit.

“The fact that this program has been jettisoned by the Turnbull government and now the NSW state government and Tasmanian government … the trend is that this ideology has some real problems and it’s not going be promoted now by people in political office in these jurisdictions,” Shelton says.

“That’s significant progress. It’s not often that you see the LGBTI agenda being turned around.”

Shelton casts the decision as a victory of community campaigners over the elites.

He makes particular mention of ethnic communities in the victory.

“The Chinese community were very active. They raised a petition of 17,000 signatures. The Greek Orthodox community was very active. To a lesser extent, the Muslims and the Indians. But definitely the Chinese.

“I’m glad some of these ethnic groups are speaking up. They have strong cultural values on marriage and family, and common humanity understandings are essential for human flourishing.

“I think there’s no doubt the idea that gender is fluid is a powerful idea that’s taken root in influential sections of the academe and state education departments and some sections of the media, the Greens political party and a large part of the Labor Party.”

Shelton’s comments are interesting in the context of the other culture war now being prosecuted by the social and political right, about migration, citizenship and “Australian values”.

On gender issues, Shelton suggests, it is migrant communities whose values are the traditional ones.

“It’s just us in the West who seem to be embracing radical ideas that certainly are out of step with human anthropology [and with] practice in cultures across millennia.

“I think this strange [idea] that we’ve got in the West where we are chopping off our roots, our culture, to pursue all manner of strange ideas not based in biology. This idea that gender is fluid is just one of those. It goes to a hollowness that has crept into Western civilisation.”

While Shelton is buoyed by the events of the week, he cautions: “This ideology is now well ingrained. It’s like a hydra with many heads. It’s a powerful idea.”

Craig Comrie notes that although NSW and Tasmania have not committed to Safe Schools, per se, they have promised broader anti-bullying programs that will include LGBTI concerns.

And the Safe Schools material remains on the federal education department’s Student Wellbeing Hub.

“The resources we produced live on,” Comrie says. “The great legacy of this program is that these issues are on the agenda now.

“A number of states have made announcements, both in terms of Safe Schools specifically and broader anti-bullying programs. That’s a good thing.

“Generally, across the country, people know there is something required in this space. And if that is under Safe Schools, that’s fine, and if it’s under another brand, that’s fine too, because this work is important.

“We have to ensure there is a focus on this group because the danger in this space is very, very high, and if young LGBTI people feel isolated then there are some pretty serious consequences [that] can occur.

“I really think ministers across the country know that. They’re just trying to find a way forward in what is a fractured public debate.”