CAIRO — A suicide bomber and two gunmen attacked the Karnak temple in Luxor on Wednesday in the second assault in a week against Egypt’s premier tourist sites, an ominous turn in the violence against the government of President Abdel Fattah el-Sisi.

Stopped by the police in the parking lot outside the temple, one of the attackers blew himself up with a suicide belt. A second was killed in a gunfight with the police, and the third attacker and at least one officer were wounded. The temple was unharmed.

Merely by signaling their intent to attack the tourist industry, however, the militants are threatening to cut off a vital engine of the Egyptian economy, which Mr. Sisi’s government had just begun to announce was sputtering back after four years of turmoil.

Luxor, in particular, evokes memories of the government’s long battle to crush an earlier Islamist insurgency that flared up two decades ago, reaching an apex in 1997 when a dozen gunmen massacred 58 tourists and six Egyptians at another ancient temple just across the Nile. But it also recalls the more recent mass shooting in March at the Bardo Museum in Tunis, where three gunmen killed more than 20 people, almost all of them tourists.