It was not Ka'bah.
MASJIDAN DHIRAARAN is here:
9:107 (The hypocrites keep making schemes.) They built a Masjid - 'Masjidan dhiraaran' - out of mischief to promote disbelief and sectarianism among the believers, and as an outpost for those who made war against God and His Messenger before. They will swear, “We only had good intentions”, but God bears witness that they are liars.
9:108 You shall not stand in such a Masjid! The Masjid whose foundation was laid from the first day on righteousness, is more worthy that you stand therein. In it there are people who love to be purified in character, and God loves those who keep clean of schism and sectarianism. [6:159]
9:109 Is he who founded his building on the secure way of God and His goodly acceptance better, or he who founded his building on the crumbling cliff of "Shirk" that topples down with him into the fire of Hell? God does not guide a people who displace right with wrong.
9:110 The building which they have built will never cease to be a source of misgiving in their hearts unless their hearts be torn to pieces. God is Knower, Wise. [A building that divides believers will remain a source of unrest in the hearts of the sectarians until their hearts stop beating]