The Iowa Democratic Party chairman is stepping down, he announced Wednesday, eight days after the Iowa caucuses became a national fiasco for the Democrats.

"The fact is that Democrats deserved better than what happened on caucus night. As chair of this party, I am deeply sorry for what happened and bear the responsibility for any failures on behalf of the Iowa Democratic Party," Troy Price wrote in his resignation letter to the State Central Committee.

"While it is my desire to stay in this role and see this process through to completion, I do believe it is time for the Iowa Democratic Party to begin looking forward, and my presence in my current role makes that more difficult."

The Iowa Democratic Party, or IDP, put out the reporting totals in fits and spurts in the days after the caucuses. Results were delayed by what Price said were "coding issues" with a smartphone app that was being used to help tabulate results in the contest for the first time.

That wasn't the only issue. The caucus results were also rife with potential errors and inconsistencies that could affect the outcome, according to a review by the NBC News Decision Desk.

Both Bernie Sanders and Pete Buttigieg claimed victory, and the confusion resulted in delegates' not being awarded until Friday — three days after the election. Buttigieg was awarded 14 delegates and Sanders 12.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The Democratic National Committee and the Sanders and Buttigieg campaigns have asked for a recanvass of certain areas, essentially a double-checking of the vote. The party said earlier Wednesday that the recanvass would begin Sunday and would last two days.

The mess has led some Democrats to call for doing away with caucuses altogether.

President Donald Trump has repeatedly mocked the Democrats for the vote counting mess, and he did again earlier on Wednesday. "We were actually able to quickly count our votes. We knew within minutes after the poll how many votes we had, unlike the Democrats," he told reporters at the White House during a meeting with Ecuador's president.

While Price accepted ultimate responsibility for what happened, he said in his resignation letter that there's plenty of blame to go around.

"There is no doubt that the process of reporting results did not work. It was simply unacceptable," he said. "It is why I called for an independent review of the decisions and processes that lead to this failure. While this process is just beginning, know that the IDP is not the only party to blame for what happened last week. We worked collaboratively with our partners, our vendors, and the DNC in this process, and I am confident the review will be able to determine exactly what went wrong, what went right, and how we can avoid this from ever happening again."

Download the NBC News app for breaking news and politics

Price also defended his staff's handling of the caucus fallout, saying they "worked under immense pressure" and endured "threats to personal safety, taunts, and anger from people around the globe."

"These are people who are working hard towards our common goal of electing Democrats in November, and I deeply regret that these dedicated employees of our party had to endure such abuse," he said.

Price was asked whether he would step down on the night of the caucuses when it became clear that the results were a mess. He said his focus was on completing the count.

The party will meet Saturday to elect an interim chair.