It was also said that its meaning is: What prevented her from worshipping Allah was not any deficiency in her intellect, as the jinn had claimed, saying that there was something amiss with her mind; rather, she had been worshipping besides Allah. (1)
It was also said that its meaning is: Solomon turned her away from what she had worshipped besides Allah; that is, he prevented her from it and came between her and it. According to this interpretation, the relative pronoun “what” is in the accusative position.
“Indeed, she was from a disbelieving people.” This is an independent statement: Allah, Exalted is He, informs that she was from a people who worshipped the sun; she grew up among them and knew no worship other than the worship of the sun.
“She was told, ‘Enter the palace.’ But when she saw it, she thought it was a body of water and uncovered her shins. He said, ‘Indeed, it is a palace made smooth with glass.’ She said, ‘My Lord, I have wronged myself, and I submit with Solomon to Allah, Lord of the worlds.’ (44)”
Regarding His saying, Exalted is He, “She was told, ‘Enter the palace,’” and the rest of the verse: Solomon wished to look at her feet and shins without asking her to uncover them, after the devils had said, “Her feet are like a donkey’s hooves, and her shins are hairy.” He therefore ordered the devils to build him a lofty structure—that is, a palace—of glass. It was also said that it was a house of glass, white like water. And it was said that the lofty structure was the courtyard of the house; he caused water to flow beneath it and placed in it every kind of sea creature—fish, frogs, and others. He then placed his throne at its far end, sat upon it, and the birds, jinn, and humans gathered around him.
It was also said that he made a courtyard of glass and placed beneath it figures of fish and frogs, so that whoever saw it would think it was water. And it was said that he built the lofty structure only to test her understanding, just as she had tested the male and female attendants. (2) When he had seated himself upon the throne, he summoned Bilqis. When she came, she was told, “Enter the palace.”