Queens state Sen. Tony Avella won’t be leaving quietly after losing the Democratic primary to John Liu, the former city comptroller whose mayoral campaign collapsed in 2013 when prosecutors caught his campaign treasurer cheating.

Avella issued a statement saying he will mount a long-shot bid on the Independence and Women’s Equality Party ballot lines in the 11th Senatorial District, which covers northeast Queens.

Avella was part of the former Independent Democratic Caucus that aligned itself with Republicans — an arrangement that infuriated Democratic Party activists and led to the ouster of Avella and five other IDC members in last month’s primaries.

Avella said his constituents “have asked me not to give up the fight but to continue to campaign for them. No matter where I go in the district since the election, residents have expressed their serious concerns with the candidates that won the Democratic and Republican Primaries.”

Liu will be heavily favored.

The Republican candidate is Vickie Paladino, who had little more than $6,000 in her campaign account, according to her most recent filing. There is also a Conservative Party candidate, Simon Minching.

In his statement, Avella ripped Liu, saying many supporters “have expressed shock that disgraced and scandal ridden John Liu won the Democratic primary. They feel John Liu is an embarrassment to the community and are very afraid of the negative impact on the community if he is elected.”

“All during the campaign countless people asked me how can he run, ‘Why didn’t he go to jail for campaign finance fraud?’”

Liu was never charged himself, but his then-campaign treasurer, Jia “Jenny” Hou, was convicted of illegal fundraising and served a 10-month federal prison stint.

The fundraising scandal derailed Liu’s 2013 bid for mayor after he was denied public matching funds over shady fundraising.

Liu defeated Avella 51 percent to 45 percent in the Sept. 13 Democratic primary, a rematch from their 2014 contest, when Avella prevailed by 6 points.

Liu spokeswoman Heather Stewart responded, “It’s about time that Tony Avella finally fesses up to what were his intentions all along. Not to worry – Democrats fired him on September 13th, and voters will fire him again on Nov 6th. Soon after, Avella will also have to answer for accepting well over $100,000 of illegal contributions.”

The reference was to a judge’s ruling that funds contributed to each of the former IDC members from a special campaign account violated the election law.