MONTGOMERY, Ala. (AP) — Former President Donald Trump, fresh off his third appearance in court as a criminal defendant, delivered a speech full of defiance and bluster on Friday night, insulting prosecutors and declaring that the charges he faces only help his 2024 presidential campaign.

“Any time they file an indictment, we go way up in the polls,” Trump said at a Republican Party dinner in Alabama. “We need one more indictment to close out this election. One more indictment, and this election is closed out. Nobody has even a chance.”

Trump pleaded not guilty on Thursday to crimes related to his efforts to overturn the results of his 2020 election loss. Although it’s his third criminal indictment this year, this case is the most serious, with the federal government he once ran charging him with orchestrating a scheme to block the peaceful transfer of power.

But Trump was characteristically unapologetic as he took the stage Friday night to Lee Greenwood’s “God Bless the USA,” flashing a thumbs-up at the crowd, raising his fist and taking in a standing ovation of nearly three minutes.

“We’re gonna be here for a little while,” he joked, asking the crowd to take a seat.

The latest set of charges focuses on the two months between his November 2020 loss to Democrat Joe Biden and the Jan. 6, 2021, insurrection at the U.S. Capitol. Trump has denied wrongdoing and has wedded his 2024 presidential campaign to his legal defense and his false claims of 2020 election fraud.

In a sign of that defiance, his campaign released an online ad Friday attacking Justice Department special counsel Jack Smith, who led the investigation that resulted in Trump’s latest charges and a separate case where he’s charged with mishandling classified documents.

The ad, which is expected to start airing on television next week, also attacks Manhattan District Attorney Alvin Bragg, who has charged Trump in a hush money case, and Fulton County District Attorney Fani Willis, who is believed to be close to filing charges in her investigation into efforts by Trump and his allies to overturn the 2020 election results in Georgia.

A Trump aide said the ad will start airing Monday and Tuesday in Washington, D.C., New York, Atlanta and on national cable. The ad was also shown to the crowd at the Alabama dinner Friday night.

Trump has continued to receive endorsements from GOP elected officials throughout the investigations and criminal cases, including on Friday from all six of the state’s Republican U.S. House members.

Sen. Tommy Tuberville of Alabama, who is waging an unprecedented campaign to try to change Pentagon abortion policy by holding up hundreds of military nominations and promotions, introduced Trump at the dinner on Friday night.

“He’s had a tough week. We need to stand behind him,” Tuberville said. “He needs encouragement. They’re after him.” Repeating Trump’s frequent refrain, he added, “They’re after you.”

Among the opening acts of the dinner were Catherine Engelbrecht and Gregg Phillips, who produced the movie “2000 Mules,” which made various debunked claims about mail ballots, drop boxes and ballot collection in the 2020 presidential election.

Trump praised the pair in his remarks and said: “Get ready. Get those votes ready. Just get them ready. Keep those tapes handy because you’re going to need them.”

The crowd of 2,700 began arriving several hours early for the dinner, a $250-per-ticket fundraiser for the Alabama Republican Party.

“They are excited,” Alabama Republican Party Chair John Wahl said. “There is so much passion from Trump supporters and voters across the state.”

Trump’s mounting legal troubles do not seem to be dampening his support in the Deep South state that is among more than a dozen that will hold primary contests on Super Tuesday. The March 5 slate of elections is increasingly seen as one of the last chances for any other GOP presidential candidate to try to make inroads in Trump’s front-runner status.

Trump’s closest rival, Florida Gov. Ron DeSantis, has been making a play for Super Tuesday states. In Alabama, though, one gauge of interest doesn’t bode well for the governor: The state GOP sold about 1,000 fewer tickets for a similar dinner in March when DeSantis spoke.

Robin Rowan, the owner of a financial company, wore a button and sash with Trump’s image and “NOT GUILTY” emblazoned in sequins as she waited Friday to hear Trump speak.

Rowan, who does not believe the criminal accusations against Trump, said the charges have galvanized support for Trump rather than making voters doubt him.

“We know the truth. They are trying to wear us down. They are not going to wear us down,” Rowan said.

Rich Foster, a retired police officer wearing a black “Bikers for Trump” T-shirt, said he believes some crimes were committed on Jan. 6, such as the attacks on police officers defending the Capitol, but does not consider Trump responsible for the violence that happened.

“I don’t think Trump committed a crime that day,” Foster said. He said he believed that Trump, as president, had a right to speak out about the election.

Trump has not been charged with inciting the attack, but prosecutors accused him of exploiting the violence and chaos at the Capitol to continue making false claims of election fraud and trying to halt the certification of the election results.

Foster said he and other Trump supporters viewed the charges as an attempt to keep Trump from winning in 2024. He said he would write in the former president’s name if he had to.

“If they get him off the ballot somehow,” he said, “I know how to write Donald J. Trump on the ballot.”