MARSHALLTOWN, Iowa — Sen. Bernie Sanders's presidential campaign has suddenly gone on the attack as he seeks to secure an opening victory in the early February caucuses, engaging in a rare dispute with Sen. Elizabeth Warren, tussling with former vice president Joe Biden and drawing an insult from President Trump.

Although Sanders (I-Vt.) mostly had resisted comparing himself with other candidates, over the weekend, his surrogates and aides intensified their attacks on Biden, targeting his past positions on racial issues and his vote to authorize the Iraq War.

At the same time, his campaign went after Warren (D-Mass.), with whom Sanders has shared a nonaggression pact for much of the primary season. A script first reported by Politico told Sanders’s volunteers to tell voters they called on Sanders’s behalf who had indicated support for her that Warren’s popularity was limited to the rich and educated — effectively denigrating her electability.

Both candidates struck back either personally or through their own surrogates on Sunday.

Warren told reporters in Iowa that she was “disappointed” with Sanders’s campaign script painting her as an elitist. She used the opportunity to warn about “factionalism” that led to Democrats losing the White House in 2016, a reference to the belief by many Democrats that Sanders and his supporters failed to sufficiently support Hillary Clinton against Donald Trump.

“I hope Bernie reconsiders and turns his campaign in a different direction,” Warren added.

Trump put an exclamation point on the Democratic infighting, calling thesenator “Crazy Bernie Sanders” in a tweet and telling his followers to “stay tuned.” A Trump campaign aide said to expect the president to mount a full-throttle attack on Sanders in coming days.

On Monday, Trump sought to stoke the dispute again in a tweet that derided Warren, Sanders and former New York mayor Mike Bloomberg, who is also running for the Democratic nomination.

“Do I see a feud brewing?” he asked.

Sanders’s emergence at the center of the clashes reflected his pivotal position in the race for the Democratic nomination. Little more than three months after suffering a heart attack that some thought would drive him from the race, he has moved to the top of the polls in Iowa, which opens the voting on Feb. 3, and remains in a strong position elsewhere, too.

His more aggressive moves — and the countering blows by other candidates who previously treated him as an unthreatening holdover — ushered in a final three weeks of campaigning here with myriad possible outcomes. Voters have been averse so far to most candidates who launched broadsides against their rivals, and Sanders as much as any candidate has tried to craft a positive image.

His continued prominence also stands to draw fire not only from Trump — who has sought to paint all potential nominees in Sanders’s democratic socialist colors — but also from moderate Democrats who fear his nomination would doom the party in November.

The weekend outbreak of hostilities reflects changes in strategy by Sanders and his opponents.

Sanders’s campaign events largely focus on his unstinting liberal proposals and the contrasts he repeatedly draws with Trump. He has long claimed, as he did in a recent town hall, that “you have not heard me disparage any of the candidates, have you? I don’t.”

But in media interviews and other settings, Sanders over time has issued increasingly blistering critiques of Biden, expanding from attacks on his vote for the Iraq War and sweeping trade deals to criticizing Biden’s past calls for curbing entitlements.

For months, Sanders’s rivals declined to attack him, viewing little to be gained from taking on a candidate with a famously loyal following who was struggling in the polls. Even as Sanders was on the rise in December — raising vast sums of cash and climbing in the early states — they mostly focused their attacks on one another.

Sanders’s top aides have long encouraged him to be more aggressive with Biden, and for much of last year, he did not heed their advice. That posture changed in recent weeks, and dramatically so over the weekend, when Nina Turner, a national co-chair of the Sanders campaign, wrote an op-ed published Sunday in a South Carolina newspaper claiming that Biden “has repeatedly betrayed black voters to side with Republican lawmakers and undermine our progress.”

“We are going to be talking about the record” when asked about Biden’s record on black America, she wrote.

Sanders’s campaign also ramped up attacks against Biden’s foreign policy experience. Jeff Weaver, a top Sanders adviser, on Saturday night issued a statement saying it was “appalling” that Biden, a longtime U.S. senator representing Delaware before assuming the vice presidency, has “refused to admit he was dead wrong on the Iraq War, the worst foreign policy blunder in modern American history.”

Weaver added: “Unlike 23 of his Senate colleagues who got it right, Biden made explicitly clear that he was voting for war, and even after the war started, he boasted that he didn’t regret it.”

Sanders has long touted his vote against the authorization of the war in Iraq, wielding it against Hillary Clinton in the 2016 primaries. On Sunday, he also took aim at former secretary of state John F. Kerry, who had defended Biden’s 2003 vote, arguing that President George W. Bush did not live up to his word.

“I think it’s a weak defense,” Sanders said. “We knew they were lying. We knew that they were altering intelligence information. You don’t have to be a genius to figure that out.”

Asked whether he felt Biden was misrepresenting his own record on Iraq, Sanders replied: “You can make that decision. All I know is I knew what that vote was about.”

A Biden spokesman declined to comment on Turner’s op-ed and Sanders’s comments about Kerry and Biden.

The increasingly intense fight between Sanders and Biden reflects their ideological disagreements and a sharp political reality: Sanders’s top staffers have argued for months that they compete for many of the same working-class voters and that Biden is the only candidate who performs better than Sanders among minorities.

The new dispute with Warren operates on another plane, as the two have been allies on some of the more contested proposals of the campaign, including Medicare-for-all, until she tweaked her proposal after sustained criticism. Recently, Sanders has not shied away from contrasting their positions, portraying his Medicare-for-all proposal as superior to her approach.

Warren has largely avoided a full confrontation with Sanders. Her comments Sunday were the sharpest to date about her liberal rival, suggesting the end of a peace pact between them.

In her remarks, Warren characterized Sanders as “sending out volunteers to trash me.” The Politico report said Sanders’s campaign instructed volunteers to say that she was favored by the elite and would not bring new supporters to the party.

“Bernie knows me, and he’s known me for a long time,” Warren said to reporters after a town hall in Marshalltown, Iowa. “He knows who I am, where I come from, what I have worked on and fought for and the coalition and grass-roots movement I’m trying to build.”

She broadened her critique of Sanders to include his behavior in 2016, which he has always defended.

“We all saw the impact of the factionalism in 2016, and we can’t have a repeat of that,” Warren said.

Warren’s team also unveiled a new contrast between herself and the other top candidates. As he was introducing Warren on Sunday, former housing secretary Julián Castro, a Warren surrogate, said that roughly a quarter of the Democratic Party would be “unhappy” if Sanders is the nominee. Castro also noted that about a quarter of the party would be “unhappy” if Biden is picked.

Only Warren, he said, “can bring this party together.”

Sanders sought Sunday to distance himself from the controversy. “We have hundreds of employees. Elizabeth Warren has hundreds of employees. And people sometimes say things that they shouldn’t,” Sanders said.

Sanders also tried to paper over any dispute between thecamps, calling the flap a “media blowup” and focusing on his long relationship with her.

“Elizabeth Warren is a very good friend of mine,” Sanders said. “No one is going to trash Elizabeth Warren.”

On Sunday, Sanders took on some other targets, including Jim Messina, an outspoken critic and a former campaign manager for Barack Obama.

“Last I heard, he was over in England working for the Conservative Party,” Sanders said of Messina.

There was one attack that Sanders didn’t personally respond to on Sunday: the looming fusillade previewed by Trump.

Sullivan reported from Iowa City. Josh Dawsey contributed to this report.