MADRID  A bomb that killed two police officers on the Spanish resort island of Majorca on Thursday, just days before the king and queen were to arrive, appeared to be the second attack in two days by the violent Basque separatist group ETA.

All ports of entry were closed temporarily while the police hunted for suspects, throwing the island’s busy airport into chaos at the height of the tourist season. The police cleared streets around the site of the bombing, and nearby beaches, normally crowded, were deserted.

The bomb exploded about 2 p.m., just as the officers were getting into a car outside a police building in the coastal town of Palma Nova, about nine miles from the main city of Palma. The victims, Diego Salva Lezaun, 27, and Carlos Saénz de Tejada García, 28, were members of the civil guard, a rural police force.

An amateur video broadcast by Sky News showed bright flames leaping from the charred wreck of the car. El Pais newspaper reported that body parts and a car seat had been hurled into a tree.