Before the time of Mohammed the Ka'a ba was a pagan temple; but when he took possession of Mecca he made the old temple the centre of worship for his own religion.