The US president said he hoped Hamas would sign up to the plan “for their own good” and signalled that the war would get worse if they did not.