Ezra explains the rebellion of the Israelites (Neh 9:26-9:31)

Nevertheless they were disobedient.

They rebelled against you.

They cast your law behind their backs.

They killed your prophets.

The prophets had warned them

To turn them back to you.

They committed great blasphemies.

Therefore you gave them into the hand of their enemies.

Their enemies made them suffer.

Then in the time of their suffering,

They cried out to you.

You heard them from heaven.

According to your great mercies,

You gave them saviors.

These saviors saved them from the hands of their enemies.

But after they had rest,

They again did evil again before you.

You abandoned them to the hands of their enemies.

Their enemies had dominion over them.

Yet when they turned and cried to you,

You heard them from heaven.

Many times you rescued them according to your mercies.

You warned them in order to turn them back to your law.

Yet they acted presumptuously.

They did not obey your commandments.

They sinned against your ordinances.

By the observance of which a person shall live.

They turned a stubborn shoulder.

They stiffened their neck.

They would not obey.

Many years you were patient with them.

You warned them by thy Spirit through your prophets.

Yet they would not listen.

Therefore you handed them over to the peoples of the lands.

Nevertheless in your great mercies,

You did not make an end of them or forsake them.

You are a gracious and merciful God.”

Their ancestors were disobedient and rebelled against God. They turned their backs on the law. They killed his prophets. They were defeated by their enemies, who made them suffer. Then they cried to God for help. After God saved them, they turned their backs on him again by doing evil. Once again they cried out after their enemies defeated them. Again they acted presumptuously and would not follow his commandments. They were stiff necked people, yet God in his mercy heard their prayer of distress. He did not abandon them because of his great mercy. God is gracious and merciful.