The soldier was killed on Wednesday when the Israeli military shelled border areas following a Hezbollah attack that left two Israeli soldiers dead, Spanish authorities said.
Israeli Prime Minister Benjamin Netanyahu telephoned his Spanish counterpart Mariano Rajoy "to express his condolences and sadness at the death in Lebanon of Corporal Francisco Javier Soria Toledo", Rajoy's office said in a statement.
"Both leaders agreed to carry out a joint Israeli-Spanish investigation to clarify what happened and to collaborate with the investigation being carried out by the United Nations."
The 36-year-old corporal was part of the 10,000-strong United Nations peacekeeping force in southern Lebanon, UNIFIL, which includes 600 Spanish soldiers. Spain's ambassador to the UN, Roman Oyarzun, told reporters on Wednesday that Soria had been killed by Israeli fire.
Israel responded with air and ground attacks on southern Lebanon after a Hezbollah missile attack killed two Israeli soldiers.