GAZA CITY (CNN) -

The boys were cousins -- playing, as they had many times before, at a beach by the sparkling waters of the Mediterranean when the shelling started.

The first shell struck a fisherman's hut on a jetty by the beach where the boys' game had taken them.

As a plume of smoke rose from the blast, several of the boys dashed across the sand, seeking cover.

But they couldn't outrun the second shell, which whizzed in and exploded right by them.

The attack on the Gaza City beach killed four boys, aged between 9 and 11, from the extended Bakr family.

Their names were Ismail, Zakaria, Ahed and Mohamed.

Growing child death toll

The Israeli military said the case is being carefully investigated and that preliminary results indicate the intended target of the strike was "Hamas terrorist operatives." It described the civilian deaths as "a tragic outcome."

But children have frequently been among the victims of the conflict between Israel and Hamas. Of the more than 200 people killed in the 10 days of Israeli bombardment of Gaza, around 40 are children, according to the United Nations.

Killings of the young also played a prominent role in setting off the confrontation.

Tensions in the region soared when the bodies of three kidnapped Israeli teenagers were found in the West Bank on June 30. Two days later, a Palestinian teen was abducted and burned alive in an apparent revenge attack in Jerusalem.

Journalists witness shelling

The deaths of the four boys on the Gaza beach Wednesday was a particularly stark example of the innocent lives lost in the fighting.

They died within eyeshot of a hotel housing several international journalists, some of whom joined in efforts to help people who were wounded in the shelling.

Veteran reporters described the harrowing scenes.

Nicholas Casey, a correspondent for the Wall Street Journal, said that after hearing a blast nearby, he went downstairs and saw bodies being carried from the scene, including one boy of around 9 or 10.

"His body was fairly mutilated and he was burned, his leg was twisted," Casey told CNN's Jake Tapper.

Another journalist said he had spent time playing with the boys.

"Minutes before they were killed by our hotel, I was kicking a ball with them," NBC News Foreign Correspondent Ayman Mohyeldin said on Twitter.

The boys had apparently been told by their fisherman parents not to go outside amid the recurrent Israeli aerial attacks. But the urge to stretch their legs in the sunshine was too strong.

"Why did he go to the beach and play -- for them to take him away from me?" cried the distraught mother of 11-year-old Mohamed.

Fears on both sides

People on both sides of the conflict have expressed concerns about the fate of children caught amid the Hamas rocket barrages and Israeli airstrikes.

"I'm not happy to see Israeli children hurt," Mustafa, a Palestinian man who used to work in Israel, told CNN this week. "I have grandchildren. I don't want them to be hurt. We want to live."

Kindergartens and summer camps in Israeli areas near Gaza have decamped to bomb shelters amid the incessant rocket fire.

In one bunker in the southern city of Ashkelon, a mother says she would like take her children away from the line of fire. But Hamas' missiles are reaching farther and farther, and for the time being, she doesn't have the money to move.

Another Israeli mother, Tal Tzukan, who lives about 10 kilometers (6 miles) from the Gaza border, said last week she's had to regularly rush her two small children into a safe room when sirens warn of incoming rockets.

From her home, Tzukran can also see the bombs hitting Gaza and says she fears for the families on the other side of the border.

"It's hard not to think about the same situation with little kids over there," she said.

Anger at funeral

The Bakr boys had no safe house in which to take refuge. And many people in Gaza have complained they have nowhere to go when warned of impending Israeli airstrikes.

The boys were buried a little more than an hour after their deaths. Hundreds of people attended the funeral, where angry chants filled the air.

The Israeli military says it works hard to try to avoid civilian casualties in its assaults on Gaza, and it accuses Hamas of using people as human shields.

On Wednesday, the Israeli military released videos that it said showed air strikes being aborted because of risks to civilians. It also uses telephone messages, leaflets and nonlethal munitions to warn occupants of homes about to be hit.

But human rights groups are unconvinced by Israel's efforts, as are members of the Bakr family.

"Were those four small boys firing rockets?" asked Sufian, one of the boys' relatives. "They went to the beach to play football."

For Ramiz, the blind father of Mohamed, it's too much to bear.

"I felt as if the world had come to an end when I heard the news," he said. "I wish I had died before hearing he was dead."