BANGKOK — The Thai government struck a combative tone on Saturday, saying it would continue its efforts to cut off antigovernment protesters from the rest of the city despite a rising death toll and determined resistance from the demonstrators.

Throughout the day and into the night, gunfire and explosions shook neighborhoods in central Bangkok that ring the one-mile area where the protesters have camped for weeks in an attempt to bring down the government. The government reported that 8 people were killed Saturday, bringing the death toll from three days of clashes to 24, with 198 people injured.

“The government cannot turn back,” Abhisit Vejjajiva, the prime minister, said in a nationally televised address on Saturday night.

“Ending the rally is the only way to prevent calamity.”

Shortly before the prime minister spoke, leaders of the country’s powerful military appeared on television in what may have been a deliberate show of unity for an army notorious for its divisions and intrigue. Unlike last month, when the government withdrew after a failed crackdown that left 25 people dead, the military said losses were unavoidable, and began calling in reinforcements, adding to the thousands of troops already here.