An Israeli court on Thursday threw out a lawsuit filed by a Palestinian family that lost two relatives after their home in the Gaza Strip was bombed during an Israel Defense Forces operation.

The Jerusalem District Court refused the family's request for damages, ruling that the fatal 2006 bombing was a legitimate act of war.

Open gallery view Palestinians inspect the damage to the Islamic Jihad club after an Israeli air strike in Beit Lahiya, northern Gaza Strip, early Thursday, Aug. 25, 2011. Credit: AP

Fatma Wahabe and her son Khaled were killed after a missile fire by an IDF assault helicopter hit their home in Khan Yunis, instead of the targeted vehicle carrying wanted Palestinian militants.

The court's decision was based in part on an affidavit filed by the head of the Shin Bet security service's department on Gaza, who defended the IDF operation as necessary "to prevent a clear, immediate, and present danger to public safety."

Justice Chana Ben-Ami determined that the IDF had no choice by to carry out that missile strike, as it represented the only way to perform the mission without risking the lives of Israeli soldiers.

"It was an initiated attack meant to strike a top terror operative based on solid intelligence, according to which he was about to attack Israeli citizens," the judge said.

The plaintiffs were also ordered to pay NIS 25,000 in legal fees.