CAIRO (AFP) - Israel has apologised to Egypt for the border killings of six policemen in August that sparked a diplomatic crisis between the two neighbours, Egypt's foreign ministry said on Wednesday. The policemen were killed on August 18, as Israeli troops hunted down militants who had carried out deadly attacks near the border with Israel. Their deaths prompted infuriated protesters to storm Israel's embassy in Cairo, forcing the ambassador to leave the country. "Egypt has indeed received an official message from Israel's defence ministry in which Israel apologises and expresses it deep remorse," a statement quoted Foreign Minister Mohammed Amr as saying. The statement said that the apology had satisfied an Egyptian demand. Late on Tuesday, Israeli Defence Minister Ehud Barack said his government, which had already expressed regret for the deaths, would be willing to apologise. "Based on the findings of the investigation, Barak decided to apologise to the Egyptians over the death of every Egyptian policeman in the line of duty as the result of Israeli fire," an Israeli statement said. The announcement came as Egypt helped mediate an elusive prisoner swap between Israel and the Hamas movement that controls Gaza and has held a captured Israeli soldier since 2006. Israel will release more than 1,000 Palestinian prisoners, including militants it had refused to set free, in exchange for the soldier, Gilad Shalit. The Egyptian state news agency MENA said Egyptian intelligence chief Murad Muwafi was a key player in helping seal the deal between Israel and Hamas. Egypt, which signed a peace treaty with Israel in 1979, has grown more assertive with its neighbour since a popular revolt ousted president Hosni Mubarak in February, leaving the military in control.