Gaining momentum in the final three months before the Iowa caucuses, Pete Buttigieg continues to gain momentum and attempt to capitalize on his foreign policy credentials, which gave him a boost in the most recent debate and help the former naval intelligence officer in contrasting himself with U.S. President Donald Trump.

Buttigieg and Elizabeth Warren offered sharply different messages this weekend as they inched closer to a confrontation over the direction of the Democratic Party.

Buttigieg, the 37-year-old mayor, was asked how as an openly gay president he "intends to deal with international leaders from countries like Saudi Arabia and Russia, where it's illegal to be gay?” The mayor responded to loud applause, "So, they’re going to have to get used to it."

Buttigieg had spoken before of recalibrating the U.S.-Saudi relationship. In June he told "Meet the Press," “We should consider putting the brakes on that relationship at a moment when, again, our values are being called into question."

Warren, a Massachusetts senator and former Harvard professor, positioned herself as a bold progressive fighter while Buttigieg, the mayor of South Bend, Indiana, said he could unite the party — and the country.

During a frenetic three-day stretch of campaigning in Iowa, two other top contenders sought to prove their staying power. Former Vice President Joe Biden argued he’s the sole Democrat who doesn’t need “on-the-job training” and Vermont Sen. Bernie Sanders reminded Iowans he’s still the outsider whose call for “political revolution” upended the nominating process four years ago.

The packed weekend offered a preview of the political and policy fights that face the leading candidates ahead of the Feb. 3 caucuses, and suggested a shift that for the first time put Warren and Buttigieg at sharp rhetorical odds.

2020 Democratic presidential hopeful Pete Buttigieg barnstorms Iowa

It also highlighted the glaring vulnerabilities of the top White House hopefuls, ensuring a fluid home stretch as candidates and caucusgoers navigate fault lines on everything from ideology to age.

It was Warren and Buttigieg who capitalized most obviously on activities centered on the Iowa Democratic Party’s annual blockbuster dinner that sometimes serves as a presidential launching pad.

Warren’s fiery attack on rivals who “dream small and quit early” and Buttigieg’s call for a “culture of belonging” ignited Iowa Democrats hungry both for economic fairness as well as a more welcoming tone from the Oval Office.

Buttigieg has gained traction in Iowa since late summer with a message of generational change and a fast-developing campaign organization.

“This is what it looks like to build up a country with that sense of belonging,” he told more than 1,000 supporters and curious Democrats at Decorah High School during his first trip to northeast Iowa. “We can’t solve it if we’re at each other’s throats.”

It’s the theme Buttigieg is embracing with growing fervor. Asked if Warren can end the partisan fighting in Washington, he said, “When you become president, you have to figure out a way to bring people together.”

“The case I’m making in my campaign is I’m best positioned to do it,” he said. “I think I can do it better.”

Warren, the leader in most Iowa caucus polls, takes a different tack, suggesting anything short of an all-out fight for a single-payer government health insurance plan is a retreat from Democratic values.

“I’m not running a campaign ... that has tested proposals” designed “not to offend anyone,” Warren said at one weekend stop. “I’m running a campaign based on a lifetime of fighting for working families.”

Yet beneath both candidates’ bravado rest signs of potential trouble.

Warren came to Iowa having just released her long-awaited plan to finance her “Medicare for all” proposal. She found just as many questions as she faced before, including from Biden and Buttigieg, who back a “public option” plan to compete alongside private insurance, rather than a single-payer system that effectively would eliminate private markets.

In Dubuque, Warren jousted with reporters, insisting taxes won’t go up “one penny” for the middle class and that people who already have insurance will save over 10 years an estimated $11 trillion they now spend on co-pays, deductibles, premiums and uncovered care. That’d be the “biggest tax break in middle-class history,” she said. The senator also defended her plan’s $20.5 trillion price tag over 10 years, even as some analysts said it would be considerably higher.

Biden, whose standing in Iowa has slipped in recent months, took full advantage Warren’s predicament.

“I’m not promising anything crazy,” he said. “I tell you straight up how we’re going to pay for it and how much it’s going to cost and how it’s going to get done.”

Even some Warren fans saw potential risks for her.

“She has values that I think can appeal to a majority of the country, but I think she swings to the left,” said Susan Griffiths, a Des Moines Democrat. “That’s fine with me personally, but it can scare people.”

For his part, Buttigieg avoided direct confrontations with Warren or Biden.

But as he projected confidence — comparing his bid to Barack Obama’s Iowa upset in 2008 — Buttigieg discovered the perils of the spotlight. In a nationally televised interview, he suggested the nomination is effectively between Warren and himself — a characterization at odds with national polls that still show Biden as a front-runner.

“I think this is getting to be a two-way. It’s early to say. I’m not saying it is a two-way,” Buttigieg said in an interview on Showtime’s “The Circus.” Buttigieg went on to say in the interview the race appeared to be becoming Warren versus the entire field.

On his campaign bus in Iowa, he backtracked. “I don’t think that came out right,” he said. It’s “not yet” a two-person race, but “there’s an amazing amount of energy behind our campaign right now.”

Buttigieg’s confidence is driven partly by Biden’s uneasy performance.

“I plan to win Iowa,” Biden boomed at a Des Moines campaign office.

Still, his position here is seen as weaker than his national standing, enough so that some of his Iowa supporters are expressing concerns.

“I like Joe. I’m 90% sure I’ll caucus for him,” said Democrat Darrell Lewis. “But he’s got to do more.”

Lewis said he knows of other more moderate Democrats like himself who don’t want Warren to be the nominee, but who’ve abandoned Biden for either Buttigieg or Amy Klobuchar.

For now, the Minnesota senator trails the top tier, but she’s demonstrated strength in Cedar Rapids, home to a concentration of Democratic voters.

Some longtime Iowa political players point to players like Klobuchar as a reminder that the final months of the caucus campaign can feature wild swings. They note supporters of longshot candidates can sway the statewide outcome because of caucus “viability” rules: Candidates who get less than 15% in a precinct are dropped from subsequent ballots, and their supporters get to choose another candidate who’s still standing.

“If people want to count out Joe Biden, that’s fine,” said Phyllis Hughes Ewing, a longtime Biden supporter whose late father was governor and U.S. senator. “But he’ll hit viability everywhere, and then pick up from others who don’t.”

Former Iowa Gov. Tom Vilsack, who has consulted with several candidates, added another warning for candidates like Buttigieg and Warren.

“We’re now entering the stage in the race where people are going to start to get real about all of this,” said Vilsack, a personal friend of Biden’s who remains neutral. “I don’t know whether Sen. Warren or any of these other candidates in the race other than Vice President Biden can take a punch.”