[1.191] Cyrus was now reduced to great perplexity, as time went on and he made no progress against the place. In this distress either some one made the suggestion to him, or he bethought himself of a plan, which he proceeded to put in execution. He placed a portion of his army at the point where the river enters the city, and another body at the back of the place where it issues forth, with orders to march into the town by the bed of the stream, as soon as the water became shallow enough: he then himself drew off with the unwarlike portion of his host, and made for the place where Nitocrisnote dug the basin for the river, where he did exactly what she had done formerly: he turned the Euphrates by a canal into the basin, which was then a marsh, on which the river sank to such an extent that the natural bed of the stream became fordable.
Hereupon the Persians who had been left for the purpose at Babylon by the, river-side, entered the stream, which had now sunk so as to reach about midway up a man’s thigh, and thus got into the town. Had the Babylonians been apprised of what Cyrus was about, or had they noticed their danger, they would never have allowed the Persians to enter the city, but would have destroyed them utterly; for they would have made fast all the street gates which gave access to the river, and mounting upon the walls along both sides of the stream, would so have caught the enemy, as it were, in a trap. But, as it was, the Persians came upon them by surprise and so took the city. Owing to the vast size of the place, the inhabitants of the central parts (as the residents at Babylon declare) long after the outer portions of the town were taken, knew nothing of what had chanced, but as they were engaged in a festival, continued dancing and reveling until they learnt about the capture. Such, then, were the circumstances of the first taking of Babylon.
https://www.livius.org/sources/content/herodotus/cyrus-takes-babylon/