The two men had not been under surveillance, and the raid was carried out after a tip was received, according to the police. The raid was carried out quickly because it was feared that an attack was planned for that day, the police said.

“Sometimes the information might come to us very, very quickly and we do not have the luxury of not being able to act,” Deputy Commissioner Michael Phelan of the federal police said.

The police did not release details of the attack said to have been threatened in the video recording, but Commissioner Burn said it was to be “consistent with the messaging” coming from Islamic State. The police said it was unclear where the attack was to have taken place.

After Mr. Abbott announced last year that Australia would join the American-led campaign against Islamic State in the Middle East, the authorities warned that Australians could be targeted by the militant group’s followers. In September, a man described by the police as a “known terror suspect” whose passport had been confiscated was shot dead near Melbourne after attacking two police officers with a knife.

In December, a gunman, Man Haron Monis, held 18 hostages in a cafe in downtown Sydney for 17 hours, telling them he was acting on the Islamic State’s behalf. He killed one hostage, and Mr. Monis and another hostage were killed when the police stormed the cafe.