Hillary Clinton has called Republican presumptive nominee Donald Trump “dangerously incoherent”.
The Democratic front-runner said Mr Trump was unfit to be president and his election would be a “historic mistake”.
Mr Trump hit back, saying Mrs Clinton “no longer has credibility – too much failure in office”.
Outside Mr Trump’s rally in San Jose, California, anti-Trump protesters clashed with his supporters in one of the worst such confrontations so far.
Several Trump supporters were punched, one was pelted with eggs and others were spat at, reports said.
But in a boost for the presumptive Republican nominee, US House Speaker Republican Paul Ryan said he would back his candidacy.
Mr Ryan had previously refused to back Mr Trump and his support is the latest sign Republicans are unifying around their nominee.
He wrote in a column in his hometown Gazette newspaper in Wisconsin “we have more common ground than disagreement”, and he attacked Mrs Clinton saying: “A Clinton White House would mean four more years of liberal cronyism.”
On the attack
In her speech Mrs Clinton, who is fighting Bernie Sanders for the Democratic nomination, rejected Mr Trump’s foreign policy points, and called him thin-skinned, irrational and unprepared.
She defended the Iran nuclear deal and said a Trump presidency could start overseas wars and ruin the US economy.
“This isn’t reality television, this is actual reality,” she said.
Hillary Clinton’s speech in San Diego on Thursday lived up to its billing as a spirited frontal assault on presumptive Republican nominee Donald Trump.
The former secretary of state mixed humour and an occasionally mocking tone with a line-by-line refutation of Mr Trump’s foreign policy views, which she said were reckless and “dangerously incoherent”.
The address, which was confidently delivered, will likely ease the concerns of Democrats who have worried that their candidate may be unable to go toe-to-toe with the unconventional Trump. At one point she quipped that Mr Trump was likely preparing angry tweets in response to her criticisms – and it wasn’t long before her predictions were proven accurate.
Last year I spoke with a number of Republican foreign policy experts who expressed excitement that the 2016 presidential race would be centred on international affairs. This probably isn’t the kind of debate they were expecting – or wanted, for that matter.
Mrs Clinton’s speech seemed crafted to try to draw in independents and disaffected moderate Republicans who are concerned about Mr Trump’s bluster. While his supporters have repeatedly said they like his tough talk, Mrs Clinton is betting that the broader US electorate will not.
Mrs Clinton also said someone like Mr Trump could not be in charge of the country’s nuclear codes and that his proposals were vague and often nonsensical.
She said his anti-Muslim rhetoric and talk of American isolationism bolstered the so-called Islamic State and argued against his disdain for Mexico and Mexican immigrants coming into the country.
Questioning his relationship with Russian president Vladmir Putin, she said: “I’ll leave it to a psychiatrist to explain his affection for tyrants.”
Mr Sanders has vowed to keep fighting for the nomination until the party’s convention in July, despite Mrs Clinton’s strong delegate lead.