ISTANBUL — Turkish ground troops entered northern Iraq on Tuesday, seeking to capture Kurdish rebels who had crossed the border after a rebel attack in Turkey over the weekend killed 16 soldiers, a government official in Turkey said.

Demonstrators angry over that attack, and a bombing that killed 14 police officers on Tuesday in eastern Turkey, filled streets in Istanbul and elsewhere. Furious crowds attacked newspapers and the offices of a pro-Kurdish political party, the Reuters news agency reported, prompting Prime Minister Ahmet Davutoglu to appeal for calm.

“I invite all my citizens with hearts full of love for the country to calm, embrace one another, and to have confidence in the state,” he said Tuesday on Twitter.

The tensions escalated as the military pursued militants from the Kurdistan Workers’ Party, or P.K.K., the government official said, speaking on the condition of anonymity in line with protocol.