This week’s portion covers an array of commandments for a variety of circumstances, from marriage and relationships to caring for the less fortunate. Some of the commandments pertain to man’s relationship with God, but most of them address the relationship between fellow humans. Like the rest of the book of Deuteronomy, this is part of Moses’s farewell address to the people, and in it he touches on a number of events which happened during their sojourn in the desert, including the war with Amalek.
The Portion of Ki Teitzei

כִּי־תֵצֵא לַמִּלְחָמָה עַל־אֹיְבֶיךָ וּנְתָנוֹ יְהֹוָה אֱלֹהֶיךָ בְּיָדֶךָ וְשָׁבִיתָ שִׁבְיוֹ׃ When you take the field against your enemies, and Hashem your God delivers them into your power and you take some of them captive, וְהָיָה בְּהָנִיחַ יְהֹוָה אֱלֹהֶיךָ לְךָ מִכָּל־אֹיְבֶיךָ מִסָּבִיב בָּאָרֶץ אֲשֶׁר יְהֹוָה־אֱלֹהֶיךָ נֹתֵן לְךָ נַחֲלָה לְרִשְׁתָּהּ תִּמְחֶה אֶת־זֵכֶר עֲמָלֵק מִתַּחַת הַשָּׁמָיִם לֹא תִּשְׁכָּח׃ Therefore, when Hashem your God grants you safety from all your enemies around you, in the land that Hashem your God is giving you as a hereditary portion, you shall blot out the memory of Amalek from under heaven. Do not forget! v'-ha-YAH b'-ha-NEE-akh a-do-NAI e-lo-HE-kha l'-KHA mi-kol O-y'-VE-kha mi-sa-VEEV ba-A-retz a-sher a-do-NAI e-lo-HE-kha no-TAYN l'-KHA na-kha-LAH l'-rish-TAH tim-KHEH et ZAY-kher a-ma-LAYK mi-TA-khat ha-sh-MA-yim LO tish-KAKH