Witnesses in the Saudi capital said they had heard an explosion and posted videos on social media showing a cloud of smoke in the air.