The building housing AFP's Gaza City office was hit in an Israeli air strike on Tuesday night, an AFP photographer said.
The photographer, Mahmud Hams, who was in the fourth-floor office at the time and was unharmed, said no AFP staff were hurt in the attack. He said at least three rockets appeared to have hit the building.
"I was in the office with a fixer and suddenly we heard an explosion," Hams said, adding that it shook the building but he didn't initially realize it had been struck.
"About five minutes passed and then we heard two more loud explosions that also shook the building," he said. "I grabbed my cameras and left the office with the fixer and there was smoke in the hallways. We ran out of the building.”
Hams noted that smoke and a fire appeared to be coming from an office on one of the upper floors.
The IDF confirmed targeting the eight-storey building in Gaza City's Rimal neighborhood, explaining that the building was attacked because it housed a Hamas military intelligence operations room.
A spokesman for the IDF told AFP the strike was a "surgical" one.
The IDF Spokesperson’s Unit official Twitter account also confirmed the incident.
"Minutes ago, we surgically targeted a Hamas intelligence operations center on 7th floor of a media building in Gaza. Direct hit confirmed," the account said.
"The Hamas terrorists weren't in the media building to be interviewed. They were there to communicate with field operatives and plan attacks," it added.
The message also included a warning to foreign reporters in Gaza. “Stay away from Hamas operatives and facilities. Hamas, a terrorist group, will use you as human shields," it said.
The latest incident clearly shows how Hamas uses innocent civilians as human shields and operates from civilian areas, knowing that the IDF won’t attack these areas because it does not hurt innocent people.
Precision aerial bombings in the Pillar of Defense counterterrorist operation have proven themselves, sparing civilian deaths and a media backlash.
Earlier this week, the IDF released a video showing how Hamas fires rockets at Israel from an underground launcher site in the backyard of a mosque.
The IDF has also shown how it called off an airstrike when pilots spotted uninvolved civilians near the target.
On Sunday night, the IDF bombed a Gaza City soccer field that camouflaged a Hamas underground missile launching site it used to attack Tel Aviv last Friday.
Covering an underground missile site with a soccer field is part of Hamas's strategy to use civilian sites as shields for terrorist activities.