Ezra 6:18 Midrash

וַהֲקִ֨ימוּ כָהֲנַיָּ֜א בִּפְלֻגָּתְה֗וֹן וְלֵוָיֵא֙ בְּמַחְלְקָ֣תְה֔וֹן עַל־עֲבִידַ֥ת אֱלָהָ֖א דִּ֣י בִירוּשְׁלֶ֑ם כִּכְתָ֖ב סְפַ֥ר מֹשֶֽׁה׃ (פ)

And they set the priests in their divisions, and the Levites in their courses, for the service of God, which is at Jerusalem; as it is written in the book of Moses.

Read midrashic interpretation of Ezra 6:18: and classical rabbinic exegesis.