Rabbi Judah (or some say Rabbi Jose) said that three commandments were given to the Israelites when they entered the land: (1) the commandment of to appoint a king, (2) the commandment of to blot out Amalek, and (3) the commandment of to build the Temple in Jerusalem. Rabbi Nehorai, on the other hand, said that did not command the Israelites to choose a king, but was spoken only in anticipation of the Israelites' future complaints, as says, "And (you) shall say, ‘I will set a king over me.'" A Baraita taught that because says, "And when He gives you rest from all your enemies round about," and then proceeds, "then it shall come to pass that the place that the Lord your God shall choose," it implies that the commandment to exterminate Amalek was to come before building of the Temple.