PENSACOLA, Fla. — Donald J. Trump, in escalating attacks against Hillary Clinton, suggested on Friday that his opponent was so immune to prosecution that she could shoot someone in front of thousands of witnesses and not be prosecuted.

“She is being so protected,” Mr. Trump, the Republican presidential candidate, said to a crowd of more than 10,000 at an evening rally here. “She could walk into this arena right now and shoot somebody with 20,000 people watching, right smack in the middle of the heart, and she wouldn’t be prosecuted. O.K.? That’s what’s happening.”

Mr. Trump’s comments followed an extended, and at times vicious and unscripted, criticism of Mrs. Clinton, the Democratic presidential candidate, whom he called “an unstable person.” He repeatedly criticized the decision not to prosecute her over her email scandal, and also her record as secretary of state.

Mr. Trump’s remarks seemed to play off a line he used during the primary race, in which he said that his supporters were so devoted to him that he could shoot someone on Fifth Avenue in New York City and not lose any of them.