Are the Jews "a nation" by virtue of ethnic origin or by virtue of being chosen by God? (That is, which of these two criteria has lexical priority over the other?) What constitutes the peoplehood of Jews? What are the relevant scriptural sources for these questions?
The Jewish people became a nation ("עם") at Mount Sinai:
וְלָקַחְתִּי אֶתְכֶם לִי לְעָם - And I will take you to Me as a nation (Shemos 6:7)
See Ibn Ezra, Sforno, Ramban there that this refers to the event of the giving of the Torah.
הַסְכֵּת וּשְׁמַע יִשְׂרָאֵל הַיּוֹם הַזֶּה נִהְיֵיתָ לְעָם לַיהֹוָה אֱלֹהֶיךָ - Pay attention and listen, O Israel! This day, you have become a people to the Lord, your God (Devorim 27:9)
וכי אותו היום נתנה תורה לישראל והלא אותו יום סוף ארבעים שנה היה אלא ללמדך שחביבה תורה על לומדיה בכל יום ויום כיום שנתנה מהר סיני - But was it then on this day that the Torah was given to the Jewish people? But was this day not at the end of the forty years? Rather, it comes to teach us that each and every day the Torah is a dear to those who study it as on the day it was given from Mt. Sinai (Brochos 63b, see also Yevamos 47b)
At Mount Sinai we were chosen by G-d:
שכשיאמר ובנו בחרת יזכור מתן תורה - When one recites [in the paragraph preceding the Morning Shema], "You have chosen us [from among all nations and tongues]," he should remember the Giving of the Torah (Shulchan Aruch Harav OC 60:4)
That's actually from this week's parsha Yitro.
19:1 In the third month after the Israelites left Egypt, on the first of the month, they came to the desert of Sinai. 19:2 They had departed from Rephidim and had arrived in the Sinai Desert, camping in the wilderness. Israel camped opposite the mountain. 19:3 Moses went up to God. God called to him from the mountain and said, 'This is what you must say to the family of Jacob and tell the Israelites: 19:4 'You saw what I did in Egypt, carrying you on eagles' wings and bringing you to Me. 19:5 Now if you obey Me and keep My covenant, you shall be My special treasure among all nations, even though all the world is Mine. 19:6 You will be a kingdom of priests and a holy nation to Me.' These are the words that you must relate to the Israelites.' 19:7 Moses came [back] and summoned the elders of the people, conveying to them all that God had said. 19:8 All the people answered as one and said, 'All that God has spoken, we will do.' Moses brought the people's reply back to God.
As you can see by parsing the words of the Torah carefully, first we are recognized as the "House of Israel" or here it's translated as "The family of Israel". We are first and foremost an Ethnic group. Modern DNA research confirms this as well. We are then secondly, a "Kingdom of Priests, and a Holy nation". It is this "Kingdom of Priests" which is promised if we "obey and keep" the mitzvot. However, the keeping of Mitzvot is our main task, along with creating a nation and country which is both Ethnic and Religious in nature. Thus allowing for a full long history of converts into our nation.
So one can say we became a nation because of our shared Ethnicity, but we continue to be a nation because of our relationship with Gd.