GOP presidential candidate, Sen. Marco Rubio, R-Fla. speaks at a town hall at Fisher Community Center in Marshalltown, Iowa. (Patrick Semansky/AP)

Marco Rubio spent the first two minutes delivering the good news: The United States is the “most unique and exceptional country in the history of mankind.”

Then for much of the next 18 minutes, he dispensed the bad: A “weak” President Obama “who didn’t want to fix the problems” diminished America’s standing and threatened its safety. Sen. Ted Cruz’s national security record is troubling. Hillary Clinton “lied” about the Benghazi attacks, he later added. People are fed up.

The youthful Florida senator launched his campaign for president on a more uplifting theme than perhaps any other Republican hopeful, promising a “new American century” and a new generation of leadership. But Rubio is now increasingly turning to outrage and fear as a motivator, raising the question: Can the optimism candidate win as a pessimist?

His criticism of Obama and Clinton is more piercing. The elbows he is throwing at his GOP opponents are sharper. And his warnings about the national security risks of siding with them over him are more dire and more frequent.

Rubio’s rhetorical escalation comes after months of mostly positive campaigning — a reflection of a GOP race that is growing nastier across the board ahead of the start of the nomination process in the Iowa caucuses on Feb. 1.

“People are angry. They are upset. They are frustrated,” he told the crowd here at a Tuesday morning town hall. A day earlier, Rubio credited Donald Trump with harnessing Americans’ frustrations. He released a new TV ad with this opening line: “Barack Obama released terrorists from Guantanamo, and now they’re plotting to attack us.”

Even with the shift toward a darker tone, Rubio still stands in contrast to other candidates who focus more heavily on dire warnings and negative attacks. Here in Iowa, Cruz (Tex.) and Trump lead the Republican field after months of public ire centered on illegal immigration. In New Hampshire, Trump holds a commanding lead and famously brash New Jersey Gov. Chris Christie is on the rise.

“We need someone who can articulate that anger and frustration effectively,” said Craig Spear of Cedar Rapids, who came to Rubio’s town hall and is also considering supporting Christie.

Still, there are voters such as Barbara Hall of Cedar Rapids who are within Rubio’s reach. To her, it’s not enough for candidates to just be angry.

“Channel that anger,” said Hall, who is also interested in Cruz.

That’s precisely what Rubio is trying to do by offering himself as an alternative with a plan, not just a war cry. At a town hall in Burlington on Monday, a man told Rubio that Trump has given him confidence that things can actually get done.

Sen. Marco Rubio, a Republican from Florida, listens to reporters’ questions after an event Tuesday in Cedar Rapids, Iowa. (Daniel Acker/Bloomberg News)

Rubio responded that Trump has “tapped into a real frustration.” But that only gets you so far, he said.

“You have to know exactly what you’re going to do if you get there and how you’re going to do it. Being angry about this by itself will not be enough,” Rubio said. “You have to allow that to become a motivator.”

Even as he is trying to draw that distinction, Rubio sometimes sounds a bit like Trump, illustrating how potent the billionaire’s “Make America Great Again” mantra has become.

“We need to get back to the principles that made us great and apply them to the challenges of the new century,” Rubio said in Cedar Rapids.

Rubio explains his recent shift to a more negative tone by pointing to disturbing developments such as the rise of the Islamic State terrorist group, also known as ISIS. “If you sense some urgency on national security, it’s because the world every week becomes more and more and more dangerous,” he told reporters.

Talking tough is a challenge for many candidates, but it is especially so for the 44-year-old Rubio, whose fast rise through the Republican ranks has drawn doubts from rivals who question his readiness for the top job. But Rubio has sought to put these questions to rest: He and his allies have released a series of TV ads with dark, gloomy hues projecting seriousness. And as other candidates dress down to appear relatable, Rubio often campaigns in a suit, giving him a formal air.

National security has become a frequent topic of dispute between Rubio and Cruz, who have also tussled over immigration. Cruz has attacked Rubio for supporting a path to citizenship for undocumented immigrants. Rubio has countered by accusing Cruz of being weak on national security because he voted to limit government surveillance and rejected defense authorization bills.

“There are candidates running who say things like they are going to carpet-bomb ISIS or how they’re going to make the sands in the Middle East glow in the dark,” Rubio said, referring to statements by Cruz.

“That’s all great and good, but talk is cheap,” Rubio continued. “You can’t carpet-bomb ISIS if you don’t have an Air Force to do it with. You can’t make the sands glow in the dark if you don’t have bombs. You can’t attack terrorists if you don’t know where they are.”

Cruz and his allies believe Rubio is especially weak among conservatives for his role in championing a 2013 Senate reform bill that provided a path to citizenship for undocumented immigrants. Rubio has tried to turn the tables by talking about immigration primarily through a national security lens.

“We know for a fact that radical jihadist groups are using our immigration system to get people into America,” he said in Burlington. “In fact, they already have on at least one occasion — using a fiance visa, which most people didn’t even know we had.”

Rubio’s example backfired when he brought it up again the next day, drawing questions from a reporter who pointed out that the 2013 immigration bill he co-sponsored would have expanded fiance visas to include those engaged to permanent residents, not just citizens.

Like all the Republicans running for president, Rubio has long criticized the national security decisions Obama and Clinton have made. But the language he has used to describe them lately has been especially stinging and vivid.

“While ISIS is beheading people and burning them in cages, he says climate change is our greatest threat,” Rubio says of the president in one of his his latest commercials.

Rubio, often criticized for his tightly controlled and rehearsed style, has also become more emotional at times. In rejecting Democratic calls for stricter federal limits on guns on Monday in Burlington, for example, Rubio made an impassioned appeal to the crowd.

“This is something that’s deeper than simply what’s legal or illegal. It is a breakdown in our culture,” he said, stretching out the first syllable for emphasis. “It is a breakdown in our values. And you need a president who understands, ‘I can’t pass a law to fix that.’ ”

Whatever his mood, Rubio’s well-known self-confidence remains. In Cedar Rapids this week, Rubio envisioned taking the oath of office. To paint the picture more clearly for the crowd, he turned to Obama as a foil.

“Unlike our current president,” he said, “I’m actually going to mean it.”