On entering the Atlantic Ocean across the sill, the salty (dense) Mediterranean water sinks to a depth of about 1000 m, where its density matches the density of the surrounding waters. Because of the physical force called surface tension caused by the difference in the density of the seas, the waters of neighboring seas do not mix where they meet and surface tension prevents them from mingling with one another, just as if a thin wall were between them.
Now note this verse of Koran:
"He has let loose the two seas, converging together, with a barrier between them they do not break through." [55:19-20]