So let's find that account. It's in Genesis 14. Here's the backstory.
For 12 years, the nations in the land of Canaan were dominated by a group of kings, who were bullies. The nations paid taxes and tribute to the nations that dominated them. The main bully was King Chedolaomor.
By the way, there is actual archaeological evidence proving that this account is true and historical.
So this domination goes on for 12 years.
In the 13th year, the subject-nations rebelled.
In the 14th year, the bully-nations attacked. They pounded the subject-nations into submission. And they took the spoils of war. And they also took... well look at verse 11, 12:
"Then they took all the goods of Sodom and Gomorrah, and all their provisions, and went their way. [12] They also took Lot, Abram's brother's son who dwelt in Sodom, and his goods, and departed." (Genesis 14:11-12)
That was their fatal mistake.
Abram (Abraham) finds out. "They took my nephew," he says.
He mobilizes 318 servants into a small army. They attack the bully-kings, including Chedolaomer. Abram wins the war, chases away the bad guys, and brings back his nephew, Lot, along with his family, and all his properties which had been seized as spoils of war.
Now, Abram is on his way home. He's got Lot and his family with him. He's got all the spoils of war with him. This happens:
"And the king of Sodom went out to meet him at the Valley of Shaveh (that is, the King's Valley), after his return from the defeat of Chedorlaomer and the kings who were with him. [18] Then Melchizedek king of Salem brought out bread and wine; he was the priest of God Most High. [19] And he blessed him and said: "Blessed be Abram of God Most High, Possessor of heaven and earth; [20] And blessed be God Most High, Who has delivered your enemies into your hand." And he gave him a tithe of all." (Genesis 14:17-20)
This is a kind of thank you party from the kings who had been defeated but were now rescued by Abram. Out comes the King of Sodom (v. 14). That is where Lot had been living.
There was another king there who had not been part of the battle. His kingdom had NOT been one of the defeated kingdoms. We get his identity in three ways:
Melchizedek (his name)
The King of Salem (his title)
The Priest of God Most High (his mission)
What I just said had some Hebrew words in it. I want to translate them:
King of Righteousness
King of Peace
Grant Access to God
And this is always the order. Later on, St. Paul will follow the same order...
"Therefore, having been justified by faith, we have peace with God through our Lord Jesus Christ, [2] through whom also we have access by faith into this grace in which we stand..." (Romans 5:1-2)
Therefore being justified by faith (King of Righteousness). That had to happen first.
We have peace with God through our Lord Jesus Christ (King of Peace)... That's only possible because you've been given the righteousness of God
Through whom we have obtained access (Priest of God).
Jesus is...
Your king of Righteousness... so that he could be...
Your king of Peace.... So that he could be...
Your Priest of God Most High.