Cinira Master logo

Old Testament · Historical narrative

The Book of Ezra: Author, Context and Complete Study

Ezra tells how the Jews returned from exile in Babylon under the decree of Cyrus and rebuilt the temple in Jerusalem despite years of opposition. Decades later Ezra the scribe arrives to teach God's law and calls the community to repentance.

Updated on

What is Ezra about?

Ezra tells how God brought his people home after the Babylonian exile. In chapters 1-6, King Cyrus of Persia lets the Jews return in 538 BC, and under Zerubbabel and the high priest Jeshua they rebuild the altar and then the temple, finished in 515 BC after years of opposition. In chapters 7-10, nearly sixty years later, Ezra the priest and scribe comes from Babylon to teach the Law of Moses (Ezra 7:10) and leads the people to confess and correct marriages that were drawing them away from the Lord.

Author
The book does not name its author. Jewish tradition credits Ezra the priest and scribe, whose first-person memoir fills 7:27-9:15; many scholars see one editor behind Ezra and Nehemiah.
Date
Probably c. 440-400 BC; its events run from the decree of Cyrus in 538 BC to Ezra's reforms in 458-457 BC.
First readers
The Jews who had returned from Babylon to Judah, a small province of the Persian Empire, who needed to know they were still God's covenant people and how to live as a holy community.
Genre
Historical narrative
Chapters
10 chapters
Key verse
Ezra 7:10

Historical context

In 586 BC the Babylonians destroyed Jerusalem and Solomon's temple and carried much of Judah into exile, as the prophets had warned. Babylon fell to Cyrus the Great of Persia in 539 BC, and in his first year as its ruler (538 BC) Cyrus issued the decree that opens the book (1:1-4). His policy of letting deported peoples go home and restore their sanctuaries is echoed in the Cyrus Cylinder, a clay inscription found in Babylon in 1879, although it does not mention the Jews. Jeremiah had foretold a return after seventy years (Jeremiah 29:10), and Isaiah had named Cyrus as the Lord's shepherd (Isaiah 44:28; 45:1).

The first six chapters cover about twenty-three years, from the return to the completion of the temple in the sixth year of Darius I (515 BC). Then the story jumps nearly sixty years: Ezra arrives in the seventh year of Artaxerxes I, 458 BC (7:7-8). Between chapters 6 and 7 fall the events of Esther under Xerxes, the Ahasuerus named in Ezra 4:6. Judah was a small district of the Persian province called Beyond the River, watched by governors and officials who answered to the king, and the returned community was poor, few in number and surrounded by suspicious neighbors.

Geographical context

The book moves between two worlds. In the east lie Babylon, where the exiles had lived for decades, and the Persian court: the decree of Cyrus is found in the archives of Ecbatana, the royal city in the province of Media (6:2), in today's Iran. Ezra's caravan gathers by the river that runs to Ahava, an unidentified place near Babylon, where he proclaims a fast before the journey (8:15, 21), and Levites are recruited from Casiphia (8:17). The trip of some 900 miles (about 1,450 km) took four months (7:9).

In the west is Jerusalem, small and still largely in ruins, with the temple site at its heart. Cedar came again from Lebanon, brought by Sidonians and Tyrians by sea to Joppa (3:7), as in Solomon's day. The opponents of the rebuilding came from the surrounding region, especially from peoples the Assyrians had settled in Samaria (4:2, 10), and the governor Tattenai represented Persian authority over the whole province Beyond the River (5:3, 6).

Why does the book of Ezra exist?

Ezra answers a question the returned exiles must have asked: after the exile, are we still God's people, and do his promises still stand? The book shows that the same God who sent Judah into exile was now keeping his word spoken through Jeremiah, moving the hearts of pagan kings (1:1; 6:22; 7:27) so that the altar, the temple, the sacrifices, the festivals and the priesthood could be restored. Its lists of names (chapters 2, 8 and 10) mattered to the first readers: they tied families and priests to Israel's past and showed who belonged to the restored community.

The book also shows that rebuilding with stone is not enough. The temple is finished in chapter 6, but chapters 9-10 reveal that the people had again begun to mingle with the peoples of the land and their abominations (9:1), the very sin that led to the exile. Ezra's ministry teaches that God's people must be shaped by his Word: studied, obeyed and taught (7:10). Within the Bible, Ezra bridges the exile and the world of the New Testament, where the temple, the Scriptures and the scribes play a central role.

Outline of Ezra

  1. Chapters 1-2

    The return under Cyrus

    In 538 BC Cyrus decrees that the Jews may return and rebuild the house of the Lord, and he gives back the 5,400 temple vessels taken by Nebuchadnezzar (1:7-11). Chapter 2 lists the families who went up with Zerubbabel and Jeshua: 42,360 people, plus servants and singers (2:64-65).

  2. Chapter 3

    The altar and the foundation of the temple

    In the seventh month the returnees rebuild the altar and keep the Feast of Booths. In the second year they lay the foundation of the temple; priests and Levites praise God, and shouts of joy mix with the weeping of old men who had seen the first house (3:10-13).

  3. Chapter 4

    Opposition to the rebuilding

    When the leaders refuse help from the people of the land, these neighbors discourage and frighten the builders, and the work stops until the reign of Darius (4:4-5, 24). Verses 6-23 look ahead to later accusations under Xerxes and Artaxerxes against the rebuilding of the city walls.

  4. Chapters 5-6

    The temple completed

    Stirred by the prophets Haggai and Zechariah, the people resume the work. Governor Tattenai writes to Darius, who finds Cyrus's decree at Ecbatana and orders the costs paid from royal revenue. The temple is finished in 515 BC, dedicated with joy and followed by Passover (6:15-22).

  5. Chapters 7-8

    Ezra's journey to Jerusalem

    Ezra, a priest descended from Aaron and a scribe skilled in the Law, receives a letter of authority from Artaxerxes and leads a second return in 458 BC. He recruits Levites, proclaims a fast at the river Ahava instead of asking for soldiers and brings the offerings safely to Jerusalem.

  6. Chapters 9-10

    Confession and reform

    Ezra learns that many, leaders included, have married women of the surrounding peoples. He prays a great prayer of confession (9:6-15), the people gather weeping, and in a covenant proposed by Shecaniah they separate from these marriages. The book closes with a list of the men involved.

Famous passages in Ezra

  • Ezra 1:1-4

    The decree of Cyrus

    In his first year, Cyrus king of Persia proclaims that the God of heaven has charged him to build him a house in Jerusalem, and he invites God's people to go up while their neighbors help with silver, gold and goods. The text says the Lord stirred up Cyrus's spirit to fulfill the word spoken by Jeremiah. The decree is repeated at the end of 2 Chronicles (36:22-23).

    Study Ezra 1 →
  • Ezra 3:10-13

    Shouts of joy and tears at the foundation

    As the foundation of the temple is laid, priests with trumpets and Levites with cymbals sing that the Lord is good and his steadfast love endures forever. Many shout for joy, but the old priests, Levites and family heads who had seen the first house weep aloud, and the sound cannot be told apart. The scene captures the hope and grief of every new beginning.

    Study Ezra 3 →
  • Ezra 4:1-5

    Help refused, opposition begins

    The adversaries of Judah and Benjamin offer to help build, saying they have sacrificed to Israel's God since the days of Esarhaddon king of Assyria. Zerubbabel and Jeshua refuse, citing Cyrus's decree. The neighbors then discourage the people, make them afraid and hire counselors against them for years. The passage is often studied as a picture of opposition to God's work.

    Study Ezra 4 →
  • Ezra 6:13-22

    The temple finished and Passover kept

    With Darius's support and the preaching of Haggai and Zechariah, the house is completed on the third day of Adar in the sixth year of Darius. The people dedicate it with joy, offer twelve goats as a sin offering for the tribes of Israel, set the priests and Levites in their divisions and celebrate Passover and the Feast of Unleavened Bread.

    Study Ezra 6 →
  • Ezra 7:6-10

    A heart set on the Word

    Ezra, a scribe skilled in the Law of Moses, travels from Babylon to Jerusalem because the good hand of his God is on him. Verse 10 explains why: he had set his heart to study the Law of the Lord, to do it and to teach its statutes in Israel. The order of study, practice and teaching has made this verse a classic for Bible teachers.

    Study Ezra 7 →
  • Ezra 8:21-23

    Fasting at the river Ahava

    Before a dangerous journey, Ezra proclaims a fast to humble the people before God and ask for a safe way for themselves, their children and their goods. He is ashamed to ask the king for soldiers and horsemen after declaring that God's hand is for good on all who seek him. God hears them, and the caravan arrives safely (8:31-32).

    Study Ezra 8 →
  • Ezra 9:5-15

    Ezra's prayer of confession

    At the evening sacrifice Ezra falls on his knees, spreads out his hands and confesses that the people's guilt has risen higher than their heads. He includes himself, recalls God's brief moment of favor in the return and admits that God has punished them less than their sins deserved. With Nehemiah 9 and Daniel 9, it is one of the great prayers of confession in Scripture.

    Study Ezra 9 →

Main themes

God's sovereignty over kings
The Lord stirs up the spirit of Cyrus (1:1), turns the heart of the Persian king toward his people (6:22) and puts it into the heart of Artaxerxes to beautify his house (7:27). Empires serve God's purposes, even when their rulers do not know him.
Worship restored according to the Word
The returnees build the altar first (3:2-3), then the temple, and they keep the Feast of Booths and Passover as it is written in the Law of Moses (3:4; 6:18). Worship shaped by God's Word stands at the center of the restored community.
The good hand of God
A recurring phrase says the hand of God was on Ezra and his companions (7:6, 9, 28; 8:18, 22, 31). God's providence explains the favor of kings, the recruitment of Levites and a four-month journey without an armed escort.
Opposition and perseverance
From chapter 4 on, the work meets discouragement, intimidation, hired counselors and official letters, and it stalls for years. God's word through Haggai and Zechariah restarts it (5:1-2), and the eye of God is on the elders so that they are not stopped (5:5).
Teaching and obeying Scripture
Ezra is the model teacher who studies, practices and then teaches (7:10). His commission from Artaxerxes is to teach God's laws to those who do not know them (7:25), and renewal in the book comes through the Law read and applied.
Holiness, confession and repentance
The restored community quickly falls into the sins that had caused the exile. Ezra responds with grief, a prayer that confesses the guilt as his own (9:6) and a call to concrete repentance, showing that God's people must stay distinct in their faith.

Main characters

Cyrus
Founder of the Persian Empire, who conquered Babylon in 539 BC. Isaiah had named him (Isaiah 44:28; 45:1), and in his first year he decreed the return of the Jews and the rebuilding of the temple, handing back its sacred vessels (1:1-11).
Sheshbazzar
The prince of Judah to whom Cyrus entrusted the temple vessels (1:8, 11). He was appointed governor and laid the foundations of the house of God (5:14-16). Some identify him with Zerubbabel; others see him as an earlier leader of the return.
Zerubbabel
Son of Shealtiel and a descendant of King Jehoiachin, he led the first return with Jeshua and directed the rebuilding of the altar and the temple (3:2, 8; 5:2). Haggai calls him God's signet ring (Haggai 2:23), and he appears in Jesus' genealogy (Matthew 1:12).
Jeshua
Son of Jozadak, high priest of the first return, called Joshua in Haggai and Zechariah. He rebuilt the altar with Zerubbabel (3:2) and led the priests in the work; Zechariah 3 and 6:11-13 make him a sign of the coming Branch.
Haggai and Zechariah
Prophets who preached in the second year of Darius (520 BC), urging the people to finish the temple (5:1; 6:14). Their messages are preserved in the books that bear their names (Haggai 1:1; Zechariah 1:1).
Tattenai
Governor of the province Beyond the River, who questioned the builders' authority and wrote to Darius asking for a search of the archives (5:3-17). When the king confirmed Cyrus's decree, Tattenai carried out the order with diligence (6:13).
Darius I
King of Persia (522-486 BC). He found Cyrus's memorandum at Ecbatana, ordered the costs of the temple paid from royal revenue and warned anyone who altered the decree (6:1-12). The temple was finished in his sixth year.
Artaxerxes I
King of Persia (465-424 BC). In one letter he halts the rebuilding of Jerusalem's walls after an accusation (4:17-23); in another he sends Ezra with authority, gifts and funds for the temple (7:11-26).
Ezra
A priest descended from Aaron and a scribe skilled in the Law of Moses (7:1-6). He led a second return in 458 BC, taught God's statutes and led the community in confession and reform. Nehemiah 8 shows him reading the Law to all the people.
Shecaniah
Son of Jehiel, who answers Ezra's prayer by admitting the people's unfaithfulness and declaring that there is still hope for Israel (10:2). He proposes a covenant and urges Ezra to act, promising the people's support (10:3-4).

In-depth study of Ezra

Introduction

Ezra picks up the story exactly where 2 Chronicles leaves off. The last verses of Chronicles and the first verses of Ezra repeat the same decree: Cyrus, king of Persia, invites the exiled Jews to go home and rebuild the house of the Lord in Jerusalem (2 Chronicles 36:22-23; Ezra 1:1-3). After seventy years of judgment, God opens a door of grace.

The book tells two stories of return. In chapters 1-6 the first wave of exiles, led by Zerubbabel and the high priest Jeshua, rebuilds the altar and then the temple, despite years of opposition. In chapters 7-10, nearly sixty years later, Ezra the priest and scribe arrives with the Law of God in his hand and in his heart (7:10, 14). Both stories teach the same lesson: God keeps his promises, but his people must be rebuilt from the inside as well as the outside.

Who wrote Ezra and when?

Ezra's memoir and the sources

The book never names its author. The Talmud says Ezra wrote it, and the most personal section, from 7:27 to 9:15, is told in the first person by Ezra himself. Chapter 10 shifts back to the third person. The author also quotes official documents: the decree of Cyrus (1:2-4), letters between local officials and Persian kings (4:11-22; 5:7-17), the memorandum found at Ecbatana with Darius's decree (6:3-12) and the letter of Artaxerxes to Ezra (7:12-26), along with lists of families, priests and Levites.

One book with Nehemiah

Ezra and Nehemiah were counted as one book in the Hebrew Bible, and many scholars think a single editor gave them their final form, perhaps from the same circle that produced Chronicles. Others stress the differences between Chronicles and Ezra-Nehemiah and prefer separate authors. All agree that the book rests on firsthand sources from the Persian period.

Dating Ezra's arrival

Ezra came to Jerusalem in the seventh year of King Artaxerxes (7:7). Most interpreters identify this king as Artaxerxes I, which places Ezra's arrival in 458 BC, thirteen years before Nehemiah (Nehemiah 2:1). A minority prefers Artaxerxes II and the year 398 BC, partly because Ezra visits the chamber of Jehohanan son of Eliashib (10:6), a name that may match a later high priest (Nehemiah 12:22-23). The traditional date fits Nehemiah 8 and 12:26, 36, where Ezra and Nehemiah serve side by side. If so, the book was completed around 440-400 BC.

Literary style and structure

Two returns, one pattern

The two halves of the book mirror each other:

  • A Persian king's decree: Cyrus (1:1-4) and Artaxerxes (7:11-26).
  • A list of those who returned: chapter 2 and 8:1-14.
  • Gifts for the house of God: 1:6-11; 2:68-69 and 7:15-22; 8:24-30.
  • A crisis: outside opposition (chapters 4-5) and inside compromise (chapter 9).
  • A resolution: the temple dedicated (chapter 6) and the people purified (chapter 10).

The pattern suggests that the same God is at work in both generations and that faithfulness has to be renewed in each one.

Hebrew and Aramaic

Two sections, 4:8-6:18 and 7:12-26, are written in Aramaic, the international language of Persian administration. Most of that material consists of official correspondence, so the reader sees the story through the eyes of the empire's bureaucracy, then returns to Hebrew for the life of the community.

Lists that tell a story

Modern readers often skip the lists, but they carry the message. The registry of chapter 2 shows a real community with roots in Judah's towns and families; priests who could not prove their descent were excluded from the priesthood, and the governor told them not to eat the most holy food until a priest could consult the Urim and Thummim (2:61-63). The list in chapter 10 closes the book on a sober note, naming priests, Levites and laymen who had broken faith.

Ezra in the story of the Bible

Kings and Chronicles end with Jerusalem in ruins and the people in exile. Ezra shows the first fulfillment of the prophets' promises of return: Jeremiah's seventy years (Jeremiah 25:11-12; 29:10) and Isaiah's prophecy that named Cyrus as the Lord's shepherd and announced that Jerusalem and the temple would be rebuilt (Isaiah 44:28). The prophets Haggai and Zechariah preached during the events of Ezra 5-6, and their books should be read alongside it. The story of Esther takes place in the gap between Ezra 6 and 7, and Nehemiah continues the account with the rebuilding of the walls. Malachi, probably written in the same period, confronts similar problems: careless worship, neglected tithes and marriages to the daughter of a foreign god (Malachi 2:11; 3:8-10).

The temple rebuilt in Ezra is the temple of the New Testament, later enlarged by Herod (John 2:20). Zerubbabel appears in both genealogies of Jesus (Matthew 1:12-13; Luke 3:27), proof that the line of David survived the exile. And the role of the scribe, the expert in Scripture who teaches the people, which Ezra embodies at its best, grew in the following centuries into the scribes of the Gospels.

Ezra and Jesus Christ

  • A temple that pointed beyond itself. The old men wept because the new house seemed small (3:12), but Haggai promised that its latter glory would be greater than the former (Haggai 2:9). That promise is fulfilled when the Lord himself enters that temple: Jesus is presented there as a baby (Luke 2:22-32) and later calls his own body the temple (John 2:19-21).
  • The line of David preserved. Zerubbabel, a descendant of David's royal line, leads the return. God kept the family alive through the exile so that the Messiah would be born of David's line (Matthew 1:12-16).
  • Priest and king. Zechariah places a crown on the head of the high priest Joshua, the Jeshua of Ezra, and speaks of the man called the Branch, who will build the temple of the Lord and be a priest on his throne (Zechariah 6:11-13). Christians see this fulfilled in Jesus, the king who is also our high priest (Hebrews 7:1-3; 8:1).
  • The one who bears our guilt. Ezra confesses the people's sin as if it were his own (9:6-7). Jesus goes further: he who knew no sin was made sin for us (2 Corinthians 5:21) and bore our sins in his body (1 Peter 2:24).
  • A greater return. The prophets described the return from exile as a new exodus (Isaiah 40:1-5), and the Gospels apply that same passage to John the Baptist, who prepared the way for Jesus (Mark 1:2-3). The return in Ezra was real but partial; the full homecoming comes through Christ.

Interpretive challenges

Why does chapter 4 jump forward in time?

Ezra 4:1-5 and 4:24 belong to the reigns of Cyrus and Darius, but 4:6-23 records later accusations under Xerxes and Artaxerxes about the walls of the city, not the temple. The author is arranging the material by theme rather than by date, showing that opposition to God's people continued for generations. Reading 4:24 as a return to the main story removes the apparent confusion.

Were the divorces of chapter 10 right?

The measure seems harsh, and readers have wrestled with it. The text frames it as obedience to the Law, which forbade marriage with the peoples of Canaan because of idolatry (Deuteronomy 7:3-4; Ezra 9:1-2, 11-12), and it was proposed by the people themselves (10:2-4). Some interpreters see it as a necessary emergency measure to save a tiny community from being absorbed into paganism; others note that the narrator records it without explicit divine approval. The New Testament gives different instructions to believers already married to unbelievers (1 Corinthians 7:12-14), so the passage should not be used as a rule for Christian marriages today.

Who was Sheshbazzar?

Sheshbazzar is called the prince of Judah and the governor who laid the foundation of the temple (1:8; 5:14-16), while chapter 3 credits Zerubbabel and Jeshua with the foundation (3:8-10). Some think they were the same man with a Babylonian and a Hebrew name. Others think Sheshbazzar led the first return and began the work, and Zerubbabel later took over the leadership.

Did Ezra come before or after Nehemiah?

The canonical order and the traditional dates place Ezra in 458 BC and Nehemiah in 445 BC. Some scholars reverse them, dating Ezra to 398 BC. The traditional order explains why Ezra and Nehemiah appear together at the reading of the Law and the dedication of the wall (Nehemiah 8:9; 12:36), and it remains the view of most evangelical interpreters.

Little-known facts

  • About a quarter of the book, 67 of its 280 verses, is written in Aramaic rather than Hebrew.
  • Ezra himself does not appear until chapter 7, nearly sixty years after the temple was finished.
  • The list of returnees in Ezra 2 reappears, with small differences in names and numbers, in Nehemiah 7.
  • The family numbers listed in Ezra 2 add up to about 30,000, yet the total given is 42,360 (2:64). The difference may include people who were not counted by family or clan.
  • The decree preserved at Ecbatana authorized a temple sixty cubits high and sixty cubits wide (6:3); Solomon's temple was twenty cubits wide and thirty high (1 Kings 6:2). Many think the figures set the limits of the royal grant rather than describing the building.
  • The name Ezra is related to the Hebrew word for help, and the book keeps saying that the hand of his God was on him (7:6, 9, 28).

How to study Ezra

Reading plan

Ezra has only ten chapters and can be read in under an hour. For a group, six sessions follow the outline well: the return (1-2), the altar and foundation (3), opposition (4), the temple completed (5-6), Ezra's journey (7-8) and confession and reform (9-10). Read Haggai and Zechariah 1-8 alongside chapters 5-6, and remember that the events of Esther fit between chapters 6 and 7.

What to look for

  • Every time the text says God stirred, turned or moved the heart of a king.
  • The phrase as it is written, and how the community measures its worship by Scripture.
  • The forms of opposition: offers of compromise, discouragement, fear, lies and legal pressure.
  • The prayers and fasts of Ezra and how he responds to sin.

Teaching it in a Sunday school class or small group

Ezra speaks to churches that are starting over, rebuilding after loss or facing opposition. Ask the group: Where do we see God working through people who do not know him? What discourages us from finishing the work he has given? How do we keep the Word at the center? With youth groups, Ezra 7:10 offers a simple plan for spiritual growth: study, live and then teach. When teaching chapters 9-10, explain the historical setting carefully, connect the call to holiness with 2 Corinthians 6:14-7:1 and remind the class of Paul's instructions to believers already married (1 Corinthians 7:12-14).

Ezra chapter by chapter

Every chapter of Ezra with a summary, key verses explained, themes, people, questions with answers and application.

Frequently asked questions about Ezra

Who wrote the book of Ezra?

The book does not name its author. Jewish tradition, recorded in the Talmud, credits Ezra himself, and 7:27-9:15 is written in his first person, like a memoir. Other parts draw on official letters, decrees and lists, some of them in Aramaic. Many scholars think one editor compiled Ezra and Nehemiah together, perhaps from the same circle that produced Chronicles, a view that is still debated.

When was Ezra written?

Its last events took place in 458-457 BC (7:7-8; 10:16-17), so the book was probably completed in the second half of the 5th century BC, around 440-400 BC. Those who see one editor behind Ezra and Nehemiah date the final form somewhat later. The events cover about eighty years, from Cyrus's decree in 538 BC to Ezra's reforms.

What is the main message of Ezra?

God is faithful: he moved pagan kings to send his people home, restored their temple and worship and gave them his Word through a faithful teacher. At the same time, the book calls God's people to holiness, showing that restoration requires ongoing repentance and obedience, not only rebuilt buildings.

How many chapters does Ezra have and how is it organized?

Ezra has 10 chapters in two parts. Chapters 1-6 tell of the first return under Zerubbabel and Jeshua and the rebuilding of the temple (538-515 BC). Chapters 7-10 tell of Ezra's return and reforms nearly sixty years later (458-457 BC). Two passages, 4:8-6:18 and 7:12-26, are written in Aramaic, the official language of the Persian Empire.

Why did Ezra require the men to send away their foreign wives?

The issue was faith, not ethnicity. The Law forbade marriage with the peoples of Canaan because they would turn Israel's heart to other gods (Deuteronomy 7:3-4), and Ezra 9:1 says the people had not separated from their abominations. Foreigners who embraced the Lord, like Rahab and Ruth, were welcomed. Interpreters debate whether the measure was an ideal or an emergency response; the New Testament tells believers married to unbelievers not to seek divorce (1 Corinthians 7:12-14).

Who was Ezra in the Bible?

Ezra was a priest descended from Aaron through Phinehas and Zadok (7:1-5) and a scribe skilled in the Law of Moses. He lived among the exiles in Babylon and came to Jerusalem in 458 BC with authority from Artaxerxes to teach and apply God's law. Later Jewish tradition honored him as a kind of second Moses for restoring the Law to the people.

Are Ezra and Nehemiah one book?

In the Hebrew Bible, Ezra and Nehemiah were counted as a single book, and they tell one continuous story of restoration. The division into two books appears in early Christian writers such as Origen and Jerome and later entered Hebrew Bibles as well. Nehemiah 8 shows Ezra and Nehemiah serving together in Jerusalem.

Why does Ezra 4 seem out of chronological order?

Verses 1-5 and 24 belong to the time of Cyrus and Darius, but verses 6-23 jump ahead to accusations under Xerxes (486-465 BC) and Artaxerxes (465-424 BC) concerning the city walls. The author groups the opposition by theme to show that it lasted for generations, then returns to the temple story in 4:24.