 the evil king is then miraculously defeated.the text seems to refer to Jeremiah Chapter 31.The choice of Ephraim as the lineage of the messianic figure described in the text seems to draw on passages in Jeremiah, Zechariah and Hosea.