Joshua 10:1
וַיְהִי כִשְׁמֹעַ אֲדֹנִי-צֶדֶק מֶלֶךְ יְרוּשָׁלִַם כִּי לָכַד יְהוֹשֻׁעַ אֶת הָעַי וַיַּחֲרִימָהּ כַּאֲשֶׁר עָשָׂה לִירִיחוֹ וּלְמַלְכָּהּ כֵּן עָשָׂה לָעַי וּלְמַלְכָּהּ וְכִי הִשְׁלִימוּ יֹשְׁבֵי גִבְעוֹן אֶת יִשְׂרָאֵל וַיִּהְיוּ בְּקִרְבָּם
It happened, when Adoni-Tzedek king of Jerusalem heard how Joshua defeated Ai and destroyed it - as he had done to Jericho and its king, he did to Ai and its king - and how the inhabitants of Gibeon had made peace with Israel, and were among them...
Just as the kings of Egypt were all called “Pharaoh” and the kings of the Philistines were called “Avimelech,” the Radak informs us that the kings of Jerusalem were all called either Adoni-Tzedek (master of righteousness) or Malki-Tzedek (king of righteousness, as in Genesis 14:18). This is because Jerusalem is known as the place of righteousness.