Jerusalem (CNN) Hamas said Wednesday that Palestinian militant groups would agree to a ceasefire if Israel also agreed to abide by one, following the biggest exchange of fire in Gaza since the 2014 war there.

The comments, made by a member of Hamas' political bureau, Khalil Al Hayya, came after militants launched what the Israel Defense Forces (IDF) described as the biggest barrage of rocket and mortar fire from the coastal enclave in years.

The IDF said it counted more than 100 launches from Gaza, and it responded with more than 60 airstrikes on targets in the enclave.

Al Hayya said in a statement early Wednesday that there had been considerable mediation efforts -- an apparent reference to Egyptian-led talks -- resulting in "a consensus to return to the ceasefire understandings of the Gaza Strip."

A picture taken from Gaza on Tuesday shows smoke billowing in the background, following an Israeli air strike.

"The resistance factions are committed [to the ceasefire], as long as the Occupation does the same," added Al Hayya, using the militant groups' term for Israel.

Read More