Former Secretary of State Hillary Clinton cast her Republican presidential counterparts’ national security proposals as “dangerous” in a speech on counterterrorism at Stanford University Wednesday.

While Clinton said “it’s understandable that Americans here at home are worried” about the Islamic State network, which claimed responsibility for attacks in Brussels that killed at least 32 people Tuesday, she said the United States needs “to rely on what actually works, not bluster that alienates our partners and doesn’t make us any safer" to protect against terror.

Clinton was, of course, referring to various statements made by Sen. Ted Cruz (R-Texas) and reality television star Donald Trump, who are trying to out-Islamophobe each other as they compete for the GOP nomination.

Cruz said after the Brussels attacks that he believed law enforcement should be empowered to “patrol and secure Muslim neighborhoods." He has previously called for carpet-bombing terrorists, an indiscriminate tactic that would endanger civilians.

Clinton said that Cruz’s “patrol and secure” proposal was akin to treating Muslims like criminals and was "wrong, counterproductive and dangerous." And carpet-bombing, she argued, “doesn’t make you sound tough; it makes you sound like you’re in over your head.”

“It’s hard to imagine a more incendiary, foolish statement,” she said of his "patrol and secure" proposal. Clinton also called Muslim Americans a “first line of defense” against national security threats. “One thing we know that does not work is offensive, inflammatory rhetoric that demonizes all Muslims,” she added.

While Trump and Cruz have both advocated for allowing torture -- the former more explicitly than the latter -- Clinton said “the United States will not condone or practice torture anywhere in the world” if she was president and called herself “proud” to be a member of an administration that outlawed waterboarding.

She also criticized Trump for suggesting that the U.S. should scale back its funding for the North Atlantic Treaty Organization, which is based in Brussels, unless the European countries in the alliance put up more money, calling NATO “one of the best investments America has ever made.”

“For decades, Republican and Democratic administrations have understood that America’s alliances make us stronger,” she said. "[Russian President Vladimir] Putin already hopes to divide Europe. If Mr. Trump gets his way, it’ll be like Christmas in the Kremlin. It will make America less safe and the world more dangerous.”

Clinton’s advice wasn’t only aimed at Trump and Cruz, however. She said European countries needed to step up intelligence sharing, make greater investments in defense and halt the flow of fighters to and from the Middle East.

Clinton’s speech was intended to emphasize her experience, her belief in “smart, strong and steady leadership” and her more hawkish approach to foreign policy compared to President Barack Obama, since polls suggest Americans trust Clinton more than Trump to handle international crises and terrorism. Her remarks foreshadowed the argument she’s sure to make in the general election if she is the Democrats’ nominee, which is that Trump’s (or Cruz’s) policies are more unpredictable and less substantive than hers.

“Loose cannons tend to misfire,” she said. “Slogans aren’t a strategy.”

She ended her speech with a little rhyming.

“America doesn’t cower in fear or hide behind walls,” she said. “We lead and we succeed.”