Jerusalem ( CNN ) -- Following an investigation , Israel apologized to Egypt this week over an August incident in which five Egyptian border guards were killed , the Israeli Ministry of Defense said . The apology , issued Tuesday , was overshadowed by news that a deal had been reached for the release of Israeli soldier Gilad Shalit , who was captured by the Palestinian group Hamas more than five years ago . However , it was largely seen as an olive branch to the transitional Egyptian government , as relations between Israel and Egypt have become strained in recent months . On August 18 , militants crossed into Israel from Egyptian territory to attack Israeli civilian targets . Eight Israeli citizens were killed in the attacks , which Israel has said were the work of a jihadist group based in Gaza . Responding to the attacks , Israeli troops killed five Egyptian border guards while in pursuit of the militants . The investigation into the incident was conducted by senior Israel Defense Forces officials and Egyptian army officials , the Ministry of Defense said . For security reasons , the ministry said , the results of the probe remain sealed . Israel issued a rare statement of regret three days after the incident , after Egypt suggested it was recalling its ambassador in protest . The overture , however , was deemed insufficient by many in Egypt and days later , angry protesters ransacked the Israeli Embassy in Cairo . The entire staff was hastily withdrawn after U.S. President Barack Obama personally intervened with the Egyptians to secure their safe passage , but the sequence of events dealt a blow to Israeli-Egyptian relations . In the wake of the embassy incident , Israeli Prime Minister Benjamin Netanyahu said Israel would stick to its 1979 peace agreement with Egypt . In the Tuesday statement , Israeli Defense Minister Ehud Barak said the August militant attack was `` despicable '' and `` meant to murder as many Israeli citizens as possible and destroy the peaceful relations that are strategically important between Israel and Egypt , '' the Tuesday statement said . But `` based on the findings of the investigation , the defense minister decided to express his apology to Egypt over the death of every Egyptian policeman who was killed while on duty as a result of Israeli fire . '' Netanyahu , meanwhile , spoke Thursday with the head of Egypt 's Supreme Council of the Armed Forces Field Marshal Mohamed Tantawi and thanked him for the `` central role '' Egypt played in the agreement for Shalit 's return , the prime minister 's office said . `` Your assistance warms the cockles of the heart of all Israeli citizens , '' Netanyahu told Tantawi .
NEW : Netanyahu thanks Egyptian field marshal for assistance with deal for Shalit 's return . Comment: Relations between the two nations have been strained in recent months .