Esther 3:1 says
After these things did king Ahasuerus promote Haman the son of Hammedatha the Agagite, and advanced him, and set his seat above all the princes that were with him.
Wikipedia says "Esther is usually dated to the 3rd or 4th century BCE." But it also says the king mentioned was in 5th century http://en.wikipedia.org/wiki/Book_of_Esther#Authorship_and_date
But 1 Samuel 15 says
Thus saith the LORD of hosts ... Now go and smite Amalek, and utterly destroy all that they have, and spare them not; but slay both man and woman, infant and suckling, ox and sheep, camel and ass. (vv.2-3)
And Saul smote the Amalekites ... And he took Agag the king of the Amalekites alive, and utterly destroyed all the people with the edge of the sword. (vv.7-8)
Then said Samuel, Bring ye hither to me Agag the king of the Amalekites. And Agag came unto him delicately. And Agag said, Surely the bitterness of death is past. And Samuel said, As the sword hath made women childless, so shall thy mother be childless among women. And Samuel hewed Agag in pieces before the LORD in Gilgal. (vv.32-33)
If Agag and all Amalekites were killed in a God-ordained genocide, how can Haman be an Agagite?
Wikipedia says
Harsh as it seems the command to blot out Amalek's memory, its justification was seen in the leniency shown by King Saul, the son of Kish, to Agag, the king of the Amalekites (I Sam. xv. 9), which made it possible for Haman the Agagite to appear (Esth. iii. 1); his cruel plot against the Jews could only be counteracted by another descendant of Kish, Mordecai (Pesiḳ. R. xiii.). Every year, therefore, the chapter, "Remember what Amalek did unto thee" (Deut. xxv. 17-19), is read in the synagogue on the Sabbath preceding Purim, and the story of Saul and Agag in chapter 15 of I Samuel is read as the Haftarah. http://en.wikipedia.org/wiki/Agag
This makes sense but timeline seems to conflict. When would events in 1 Samuel 15 have happened? Before or after Esther written?
Esther 2:5-6 says Mordecai is put in exile which would be almost 600 BCE, but wouldn't he have to be over 100 to then be present for the events in Esther, even by conservative estimate? Trying to fit the events of 1 Samuel in with Esther and make sense of timeline but it doesnt seem to line up right.