At least six people were killed and twelve injured in the attack.
The two perpetrators were killed on the spot, Israeli media reported on Monday, citing police.
Initially, Hamas praised the deed, but did not take responsibility. Then the extremist movement called the attack a "natural response to the crimes of the occupation against our people".