The two Books of Samuel (Hebrew: Sefer Shmuel ספר שמואל) are part of the Deuteronomistic history, a series of books (Joshua, Judges, Samuel and Kings) in the Hebrew Bible/Old Testament that constitute a theological history of the Israelites which explains God's law for Israel under the guidance of the prophets. According to Jewish tradition the book was written by Samuel, with additions by the prophets Gad and Nathan; modern scholarly thinking is that the entire history (called the Deuteronomistic history) was composed in the period c. 630–540 BC by combining a number of independent texts of various ages.
Samuel begins with the prophet Samuel's birth and God's call to him as a boy. The story of the Ark of the Covenant that follows tells of Israel's oppression by the Philistines, which brought about Samuel's anointing of Saul as Israel's first king. But Saul proved unworthy and God's choice turned to David, who defeated Israel's enemies and brought the Ark to Jerusalem. God then promised David and his successors an everlasting dynasty.
The childless Hannah vows to Yahweh of hosts that if she has a son, he will be dedicated to him. Eli, the priest of Shiloh (where the Ark of the Covenant is located), blesses her, and a child named Samuel is born. Samuel is dedicated to the Lord as a Nazirite – the only one beside Samson to be identified in the Bible. Eli's sons, Hophni and Phinehas, prove unworthy of the priesthood and are killed in battle during the Battle of Aphek, but the child Samuel grows up "in the presence of the Lord."