Hamas claimed responsibility for the rocket attack after a series of violent clashes between Palestinians and police.