Hezbollah sent the message through intermediaries, Israeli Defense Minister Moshe Yaalon told Israel's Army Radio.
"There are nonofficial channels between us and Lebanon to communicate through UNIFIL (United Nations peacekeepers in Lebanon), and indeed a message like that was received from Lebanon," Yaalon said.
On Wednesday, Hezbollah fired five antitank missiles at Israeli military vehicles in the disputed Shebaa Farms area, killing an officer and a soldier, the Israeli military said. Sgt. Dor Chaim Nini was 20; Capt. Yochai Kalangel was 25, Israel Defense Forces said.
The attack took place near Shebaa Farms, also known as Har Dov, a disputed strip of land between Lebanon and Syria adjoining the Golan Heights, under Israeli control.
Seven Israeli soldiers were injured, two of them moderately, the Israeli military said.
Hezbollah claimed responsibility for the attack.
Yaalon accused Iran and Hezbollah of planning an attack from Syria on the Golan area, which is under Israeli control.
"This reflects a general picture that Iran and Hezbollah are trying to heat up the region and Golan Heights area because it is easy for them to operate in."
He warned against such attacks, saying:
"The IDF is ready and we will not allow any terror parties to act against us. And the hosts behind those terror groups we will not allow to attack IDF or civilians. We must protect civilians both offensively and defensively."
The Spanish service member, Cpl. Francisco Javier Soria Toledo, was serving with UNIFIL, the U.N. Interim Force in Lebanon. He was killed "during the incidents that happened between Hezbollah and the Israeli military" Wednesday, the Spanish government said.
UNIFIL said that its personnel "observed six rockets launched toward Israel" Wednesday morning, and that the IDF "returned artillery fire in the same general area."
It was unknown whether the peacekeeper, 36, was killed by Israeli or Hezbollah fire. The Israeli military told CNN it is investigating.