Trump called out Sen. Jeff Flake (R-Ariz.) and Sen. Lindsey Graham (R- S.C.) on Aug. 17 for their criticism of his leadership. Here are 4 other politicians Trump has targeted on Twitter. (Elyse Samuels/The Washington Post)

President Trump went on the offensive Thursday against two Republican senators, attacking them for their recent criticisms of his divisive governing style and response to the violence in Charlottesville.

In a morning tweetstorm, Trump lambasted Sens. Lindsey O. Graham (S.C.) and Jeff Flake (Ariz.), calling Graham “publicity-seeking” and Flake “toxic” and endorsing a primary challenger to Flake in his reelection bid next year. Flake recently published a book that was highly critical of Trump.

Trump appeared to throw his support behind former Arizona state senator Kelli Ward, who is already mounting a primary challenge against Flake.

Flake wrote in his book that Republicans abandoned their principles in the face of Trump's unorthodox campaign and surrendered to the “politics of anger.” The party gave in to “the belief that riling up the base can make up for failed attempts to broaden the electorate,” Flake wrote in “Conscience of a Conservative: A Rejection of Destructive Politics and a Return to Principle.” “These are the spasms of a dying party.”

Sen. Jeff Flake (R-Ariz.) says the Republican president in the White House is not displaying the conservatism his party should be embracing. In his new book, "Conscience of a Conservative," Flake says populism and protectionism are as threatening to the GOP now as the New Deal was in 1960. (Dalton Bennett,Kate Woodsome/The Washington Post)

Ward is an osteopathic physician who unsuccessfully challenged Sen. John McCain (R-Ariz.) in 2016, using the senator's advanced age against him. This time, Ward is hoping to use Flake's opposition to Trump to her advantage.

“Jeff Flake has been unable to effectively serve the people of Arizona. That’s the big story,” she said in an interview last week. “That’s why he has such dismal job approval ratings. He’s been there almost 20 years and has accomplished really nothing. His values don’t align with his constituents and it’s time for him to be sent back home and send somebody to Washington, D.C. who can accomplish the America First agenda that the president put forth but that the American people embraced across this entire country.”

Ward said that she's especially upset with Flake's recent words and actions on health care and taxes — even though he voted for the GOP health-care bill and is supportive of attempts to overhaul the tax code.

So where has Flake gone wrong?

On taxes, “he's already come out with his opposition,” Ward claimed. “Rather than saying 'I’m looking forward to what Donald Trump puts forward so that we can accomplish the goal of lowering taxes across the board and making sure that our American economy thrives,' he puts a negative spin on it from the beginning.”

And on health care, she said she's upset with “his behavior — I'll call it his behavior on Obamacare.

“When the bill was over in the House, Jeff Flake was over in the Senate telling reporters … that there just was no appetite for full repeal of Obamacare in the Senate. He was whispering to his donors in the hospital corporations and the insurance industry not to worry.”

Ward specifically cited a Washington Post story from May that included Flake telling constituents that he had a “hard time believing” that the Senate would vote to pass health-care legislation before the August recess.

Flake's campaign spokesman responded in a statement, “You don't serve Arizona by cutting backroom deals in Washington, D.C. That's why Senator Flake will always fight for the people of our state.”

McCain tweeted a defense of Flake.

On Thursday evening, Senate Majority Leader Mitch McConnell (R-Ky.) expressed support for Flake in a written statement. "Jeff Flake is an excellent Senator and a tireless advocate for Arizona and our nation. He has my full support," said the statement, which was posted via McConnell's political account on Twitter and signed "MM."

The Club for Growth, a conservative advocacy group that supported Flake when he first ran for the Senate in 2012 and which has clashed with Trump, rebutted Trump's broadside against the Arizona Republican.

"The President's words about Sen. Flake speak for themselves, but at the end of the day the people of Arizona, not Donald Trump, will decide the fate of Senator Flake's reelection," Club for Growth spokeswoman Rachael Slobodien said in an email. "It is ironic though that when it comes to some of the most significant policy and confirmation battles, Sen. Flake has voted to support the President’s position."

Trump also slammed Graham, who was among the Republicans who criticized Trump for failing to offer a full-throated condemnation of the white supremacist rally in Charlottesville. The president waited two days before denouncing the neo-Nazis and Ku Klux Klan groups that organized the Unite the Right event, only to reverse course Tuesday to again blame “both sides” for the violence that left a counterprotester, Heather Heyer, dead. Two police officers also died in a helicopter crash.

In going after Graham, Trump suggested the senator, who also ran for president in 2016, was still smarting from his loss to Trump in the Republican primaries.

Graham responded with a statement in which he said Trump's handling of the Charlottesville violence was being praised by “some of the most racist and hate-filled individuals and groups in our country. For the sake of our Nation — as our President — please fix this. History is watching us all.”

Trump's tweets made clear that the president is willing to challenge fellow Republican lawmakers and potentially imperil their reelection chances if they criticize him. The GOP holds a narrow 52-48 margin in the Senate, though most political analysts say it will be difficult for Democrats to win back the chambers in 2018 because of the election map favoring Republicans.

But Trump also needs to maintain party loyalty to help pass his legislative agenda, including upcoming efforts at tax revision and, perhaps, infrastructure. McCain, for example, cast a crucial vote against the GOP's effort to repeal the Affordable Care Act, prompting Trump to attack him repeatedly — including yet again on Tuesday during his heated news conference in New York.

President Trump's relationship with Congress has become more and more strained as he struggles to find legislative wins. Now he's going after Senate Majority Leader Mitch McConnell (R-Ky.), a key leader in his own party. (Jenny Starrs/The Washington Post)