Palestinian gunmen freed a Spanish photographer working for the Associated Press news agency in the Gaza Strip on Tuesday, hours after they had kidnapped him, a senior Palestinian official said.

"The photographer was released by the kidnappers and handed over to Palestinian security agents. He is no longer in the hands of the kidnappers," Tawfi Abu Khoussa, a spokesman for Palestinian Authority Chairman Mahmoud Abbas's Fatah movement said.

Gunmen grabbed Emilio Morenatti, 37, as he walked out of his Gaza City apartment, whisking him away in their vehicle, a witness said.

The photographer had been heading out of his apartment for an AP car, where Majed Hamdan, an AP driver and translator, was waiting.

Hamdan said four gunmen grabbed his keys and phone and told him to turn away, pressing a gun to his head and threatening to harm him if he moved.

Then they grabbed Morenatti, shoved him into a white Volkswagen and drove off, Hamdan said. There was no immediate claim of responsibility.

Palestinian Prime Minister Ismail Haniyeh said earlier Tuesday he had instructed Interior Minister Said Siyam to do everything possible to secure the release of the photographer.

"The government is exerting its maximum efforts to guarantee the safe return of Emilio to his family and his colleagues in the agency," Haniyeh said after meeting AP representatives in Gaza City . He also expressed solidarity with Morenatti's family and the AP staff in Gaza.

Fawzi Barhoum, a Hamas spokesman, said the kidnapping "contradicts our culture and our morals and our religion." He said the Islamic militant group called on the kidnappers "not to harm Emilio and release him immediately."

Abbas promised Spanish Foreign Minister Miguel Moratinos earlier Tuesday that he would take all necessary steps to speed up Emilio's release. Ghazi Hamad, spokesman for the Hamas-led Palestinian government, condemned the kidnapping, saying it "damages the reputation of the Palestinian people."

"The government will take all steps to ensure his release," Hamad said.

Fawzi Barhoum, a Hamas spokesman, said the kidnapping "contradicts our culture and our morals and our religion." He said the Islamic militant group called on the kidnappers "not to harm Emilio and release him immediately."

Abbas' confidant and chief Palestinian negotiator Saeb Erekat also condemned Morenatti's kidnapping, saying it "harms Palestinian interests."

Tom Curley, AP president and chief executive officer in New York, said the company was doing everything to find Morenatti.

"The Associated Press is working to find out just what happened to Emilio. We are in contact with Palestinian officials and leaders to learn more, and to try and obtain his release. Our main concern now, however, is for his safety," Curley said.

"Emilio has spent his career representing the values that AP stands for - truthful, accurate journalism that tells all sides of the story. It is a sad development when the men and women the world rely on to bring them objective news are subject to such dangers. No cause or motive can justify such senseless action," Curley said.

Morenatti, from Jerez, Spain, has been working for the AP in Jerusalem since April 2005. As part of his job, he would periodically go to the Gaza Strip and the West Bank. He had been in Gaza since Sunday.

Morenatti began working for the AP in April 2004, when he spent a year in Afghanistan covering the conflict. He also covered the recent war in Lebanon and the World Cup soccer tournament in Germany.

In 1992, Morenatti began work as a photographer with EFE, the Spanish news agency, in Seville, Spain.

Palestinian militants in Gaza have often kidnapped foreign journalists and aid workers. All those kidnapped have been released unharmed. In August, two Fox News journalists were kidnapped in Gaza and held for two weeks.