Facing a tougher than expected challenge from Senator Bernie Sanders of Vermont, Hillary Clinton’s campaign is preparing for a primary fight that could stretch into late April or early May and require a sprawling field operation in states and territories from Pennsylvania to Guam.

With the Iowa caucuses in two weeks and Mr. Sanders’s insurgent candidacy chipping away at Mrs. Clinton’s once formidable lead there, Clinton aides are acknowledging that the road to the party’s July convention could be an expensive slog. “Remember, I campaigned all the way into June last time,” Mrs. Clinton told CNN last week.

Even though the Clinton team has sought to convey that it has built a national operation, the campaign has invested much of its resources in the Feb. 1 caucuses in Iowa, hoping that a victory there could marginalize Mr. Sanders and set Mrs. Clinton on the path to the nomination. As much as 90 percent of the campaign’s resources are now split between Iowa and the Brooklyn headquarters, according to an estimate provided by a person with direct knowledge of the spending. The campaign denied that figure.

The campaign boasted last June, when Mrs. Clinton held her kickoff event on Roosevelt Island in New York, that it had at least one paid staff member in all 50 states. But the effort did not last, and the staff members were soon let go or reassigned. (Mrs. Clinton’s campaign manager, Robby Mook, said they had been hired as temporary workers to sign up volunteers at the start of the campaign, an effort he said had paid off organizationally.)