* Ban calls for immediate end to Gaza fighting
* Qatari FM calls Shejaia killings a massacre
* Attiyah says Palestinians need end to blockade on Gaza (Adds comments from Palestinian President and chief negotiator )
By Amena Bakr
DOHA, July 20 (Reuters) - U.N. Secretary-General Ban Ki-moon condemned as an "atrocious action" the killing of dozens of Palestinians in the Gaza Strip by Israeli shelling on Sunday and called for an immediate end to almost two weeks of fighting.
Ban, in Doha on the first leg of a Middle East tour to try to end the bloodshed that has cost more than 400 lives, met Qatar's Emir Sheikh Tamim bin Hamad al-Thani, Palestinian President Mahmoud Abbas and Qatari Foreign Minister Khaled al-Attiya before heading for Egypt.
"While I was on route to Doha, dozens more civilians have been killed in the Israeli military strikes . . . in Gaza ... I condemn the atrocious action," he said in a statement after talks with Attiya.
"Israel must exercise maximum restraint. I repeat my demands to all sides that they must respect international humanitarian law. The violence must stop now," he added.
More than 60 Palestinians and 13 Israeli soldiers were killed as Israel shelled Gaza's Shejaia neighbourhood and battled militants in the bloodiest fighting in the 13-day offensive.
Attiyah called the killings a massacre and said Israel must not be allowed to chose when to wage a war and when to stop.
"We condemn all the atrocities perpetrated by Israel against the Palestinian people, the last of which was al-Shejaia massacre today," Attiya said. "The majority of the victims were women and children."
In an appeal filmed in Doha, Palestinian President Abbas called on the international community to protect Palestinians against what he called the current "unbearable" situation.
"The U.N. security council has failed to protect Palestinians and I call on the council to hold an emergency meeting today to protect Palestinians... what Israel did today is crime against humanity," he said in the recording shown to reporters.
He further called for an immediate ceasefire that was agreed upon in Cairo and stressed that unity among all factions in the Palestinian territories.
Qatar has emerged as a possible peacemaker in the Gaza Strip after the Islamist Hamas group, which controls Gaza, rejected an Egyptian proposal for a ceasefire.
Hamas demanded instead that any accord must include lifting a blockade imposed by Israel and Egypt on the Gaza Strip and a return to an understanding that ended a previous round of fighting in 2012.
U.S. officials say Washington has asked Qatar to try to influence Hamas, whose leader lives in Doha, but they said that those links mean Israel is unlikely to accept it as a mediator.
Attiyah said Qatar was only conveying the Palestinian demands, which he said must include the opening of Gaza's border crossing points with Egypt and Israel.
"Consultations, discussions are still underway to have a ceasefire in place, simply for the reason that the Palestinian people can no long accept the long siege," Attiya said.
A source in Doha has said that Sheikh Tamim had been acting as a "channel of communication" between Hamas and the international community.
Hamas's conditions include the release of prisoners re-arrested since a 2011 exchange deal with Israel, the opening of Gaza-Israel border crossings and an end to an Israeli blockade on the Gaza seaport, a Hamas source in Doha told Reuters.
"In general, Israel must end all forms of aggression and attacks, end the blockade of Gaza and remove the actions that resulted from its military offensive in the West Bank after June 12," Hamas spokesman Sami Abu Zuhri told Reuters in the Palestinian Territories.
Chief Palestinian negotiator Saeb Erakat echoed the same demands of Hamas, saying that these should not been seen as conditions, but rather as a "fair" set of commitments that Israel must adhere to.
"We are now all united as one, we speak as Palestinian people, not as Hamas or Fatah, and we are in contact with all factions," Erakat told reporters in Doha, adding that Abbas had also called U.S. Secretary of State John Kerry.
Western diplomatic sources see Qatar as a significant player in reaching an effective ceasefire deal because the wealthy Gulf Arab state hosts a large number of exiled Islamists from across the Middle East, including Hamas leader Khaled Meshaal.
Meshaal, who visited Kuwait on Sunday and held talks with the Gulf state's emir, was due to meet Abbas in Doha later on Sunday. Kuwait currently holds the rotating presidency of the Arab League.
The senior Qatari source said Abbas was also due to hold talks with Meshaal following his meeting with Ban.
"Qatar will not put any pressure on Hamas to bring down or reduce or change their demands. Qatar is only acting as a communication channel," the source said.
Egypt said on Saturday it had no plans to revise its ceasefire proposal. The Hamas source in Doha said the group, for its part, had no plans to change its conditions for a ceasefire.
"We want the rights of our people. Palestinians on the ground are supporting us and we will get them back their rights," said the source.
Ban was also due to visit Cairo, Jerusalem and Ramallah in the West Bank during a visit to the Middle East. (Additional reporting by Michelle Nichols in New York and Nidal Al Mughrabi in Gaza; Editing by Sami Aboudi, William Maclean and Tom Heneghan)
Our Standards: The Thomson Reuters Trust Principles.