JERUSALEM — The Israeli defense minister, Ehud Barak, said on Monday that a terrorist attack that killed 15 Egyptian soldiers on Sunday night should serve as “a wake-up call” to the new Egyptian president about the growing danger in the Sinai Peninsula and the border between the two nations.

Masked gunmen attacked an Egyptian Army checkpoint around sundown on Sunday, as the soldiers were preparing to break their Ramadan fast. Lt. Col. Avital Leibovich, an Israeli military spokeswoman, said on Monday that the gunmen then seized an armored vehicle and a truck, and stormed the fence at the Kerem Shalom crossing into Israel with the apparent goal of kidnapping an Israeli soldier or civilians.

The men loaded the truck with explosives and blew it up, killing the driver, Colonel Leibovich said; Israeli airstrikes killed six or seven more of the attackers, in the armored vehicle and as they fled. Lt. Gen. Benny Gantz said Monday that the operation lasted about 15 minutes.

“I think that the risk of a very large terrorist attack was averted,” Mr. Barak told Parliament’s Foreign Affairs and Defense Committee on Monday morning, “and this was a very important operational success in the battle that is raging there and maybe a proper wake-up call for the Egyptians to take matters into their own hands on their side in a stronger manner.”