DES MOINES — She couldn't get the mobile app to work. And she couldn't get through to the state party. So Linda Nelson, a precinct chair in Pottawattamie County, chose her next best option: Facebook.

“HELP!” she wrote, describing how she kept getting an error message on the app she needed to report caucus-night returns to the Iowa Democratic Party, the group tasked with the high-profile responsibility of beginning the state’s process of choosing a presidential nominee.

After years of preparation designed to prevent the chaos and confusion that marred the caucuses in 2016, and after careful planning aimed at preventing the spread of conspiracy theories by hostile foreign actors, Democrats began their high-stakes nominating contest this week under a cloud of uncertainty and dysfunction. Hours after caucus-goers had returned home, the contest remained in a state of suspended confusion — with precincts unable to communicate results, state party officials huddling with aides to the top candidates and, above all, a blemish on the process held out by Iowa as a model of civic engagement.

Democratic leaders in the state said results would arrive “as soon as possible” on Tuesday. Troy Price, the chairman of the Iowa Democratic Party, said the delay was caused by a “coding issue” with the mobile app used to report returns, which caused “inconsistencies.”

“We have every indication that our systems were secure and there was not a cybersecurity intrusion,” he said in a statement, adding that “planned backup measures” and manual data entry meant that the party had access to accurate underlying figures.

While the state party worked to tamp down suggestions of malfeasance or a corrupted outcome, the delay meant the global spotlight trained on Iowa illuminated yet another setback in the workings of American democracy.

The chaos provided an opportunity for some to sow doubts about the credibility of the nominating process, illustrating how the opacity of the contest in Iowa could invite efforts to undermine its legitimacy.

Brad Parscale, the manager for President Trump’s reelection campaign, took to Twitter to suggest without evidence that the process was “rigged.” He followed up with a formal statement, reveling in the confusion. “Democrats are stewing in a caucus mess of their own creation with the sloppiest train wreck in history,” Parscale said.

Additional doubts were raised by senior Democratic campaign aides. A lawyer for Joe Biden’s campaign addressed a letter to state party officials citing “considerable flaws in tonight’s Iowa Caucus reporting system.”

“The app that was intended to relay Caucus results to the Party failed; the Party’s backup telephonic reporting system likewise has failed,” wrote the campaign’s general counsel, Dana Remus. “Now, we understand that Caucus Chairs are attempting to — and, in many cases, failing to — report results telephonically to the Party.”

Biden’s deputy campaign manager, Kate Bedingfield, tweeted that the “integrity of the process is critical.”

Suspicion was deepened by Rep. Ilhan Omar (D-Minn.) — a backer of Sen. Bernie Sanders (I-Vt.) — who amplified a tweet early Tuesday suggesting that the app’s developer was tied to former South Bend, Ind., mayor Pete Buttigieg’s campaign.

Representatives for Shadow, the tech firm that developed the app, didn’t respond to a request for comment. The company released a statement Tuesday on Twitter expressing “regret” for the delay and saying the underlying technical issue had been corrected. A spokesman for Buttigieg’s campaign also didn’t immediately respond.

Records show additional campaigns paid for services from the company, including Biden’s and Sen. Kirsten Gillibrand’s (D-N.Y.). (She left the race in August.) The same app is set to be used for the Feb. 22 caucuses in Nevada, according to a Democratic official who requested anonymity because he wasn’t authorized to speak publicly.

Early Tuesday morning, a spokeswoman for the Department of Homeland Security, Heather Swift, said department’s Cybersecurity and Infrastructure Security Agency had offered to test the app for the state party, but leaders in Iowa declined.

The state party said it was laboring to obtain and verify results after finding several instances of inconsistent returns.

“We found inconsistencies in the reporting of three sets of results,” said Mandy McClure, a spokeswoman for the state party. “In addition to the tech systems being used to tabulate results, we are also using photos of results and a paper trail to validate that all results match and ensure that we have confidence and accuracy in the numbers we report.”

She said the difficulty was a “reporting issue,” emphasizing that the app “did not go down and this is not a hack or an intrusion.”

“The underlying data and paper trail is sound and will simply take time to further report the results,” McClure added.

Meanwhile, with no results reported, Buttigieg effectively declared himself the winner — telling supporters during an overnight appearance that, in Iowa, “an improbable hope became and undeniable reality.”

“By all indications,” he said, “we are going on to New Hampshire victorious.”

And, despite the lack of any numbers from the state party, Sen. Amy Klobuchar (D-Minn.) told supporters hours after the caucuses, “We are punching above our weight.”

Democratic leaders across the state said volunteer precinct chairs had waited until the last minute to download the app. Last-minute instructions sent by the state party informed them that the PIN they had been using to test the software was no longer valid. Some were sufficiently confused by the process that they swore off the app altogether and chose to phone in the results, jamming the line.

“What am I doing wrong?” asked Nelson, the chairwoman in Pottawattamie County, unable to get answers from the email address provided by the party and so turning to social media.

Across the state in Linn County, caucus chairs were snapping pictures of results in their precincts and attempting to text the images to the Iowa Democratic Party, after getting stuck on the app and failing to get through when they called party headquarters in Des Moines, according to Bret Niles, the county’s Democratic chairman.

“People are getting hung up at different phases of the app,” Niles said. “They tried that and either they can’t get through or they get through and it takes a while. Or they’re calling to report the results and it’s just a large number of people trying to get through.”

At about 11 p.m. Central time, caucus leaders in Johnson County were still waiting on hold with the Iowa Democratic Party so they could report the results over the phone.

“He couldn’t get the app downloaded on his phone,” John Deeth, a caucus organizer, said of one precinct leader.

Elesha Gayman, the Democratic chairwoman in Scott County, said the problem, perversely, was too much security. “It was so secure that people got locked out and couldn’t get back in,” she said. “It kind of failed us.”

Sean Bagniewski, the chairman of the Polk County Democrats, said there was no training from the state party on how to use the app.

Iowa Democrats took great pains to prevent this very situation. A breakdown in reporting on the mobile app was among the scenarios used in a role-play run in Des Moines last fall by the Defending Digital Democracy Project at Harvard’s Belfer Center for Science and International Affairs. The state party, along with its Republican counterpart, partnered with the project’s leaders for a simulation in November. They were joined by security experts as well as developers behind the website and mobile app used by the parties to publicize caucus details and report returns.

Details of a problem would arrive via email, bringing news, for example, of difficulty with the app or of false tweets claiming that the caucuses began at a different time. Democrats used the simulation to develop possible plans for caucus night, including contingencies such as bringing in the Department of Homeland Security and contacting executives at Twitter.

“Iowa has the honor of holding our first in the nation caucuses,” Price, the Democratic chairman in Iowa, said in an interview last month about efforts to revamp the process to prevent chaos. “This is a responsibility that we take very seriously — to make sure to protect the integrity of our process and secure the choices of Iowans in this process.”

In a statement early Tuesday, Price said, “We are validating every piece of data we have against our paper trail.”

Michael Scherer, Michelle Ye Hee Lee and Chelsea Janes contributed to this report.