When Barack Obama took the oath of office as president in 2009, George W. Bush wished him well and left the political stage, determined to never publicly criticize his successor. It is a vow he kept for the entire eight years of Obama’s presidency. Indeed, Bush has given only one political speech since leaving office — and that was for his brother Jeb in 2016.

Even when Obama attacked him repeatedly from the presidential bully pulpit and reversed many of his policies, Bush kept silent. “I don’t think it’s good for the country to have a former president undermine a current president,” he said. “I want the president to succeed. ... He deserves my silence.”

Bush did it not simply as a courtesy. He understood better than almost anyone the incredible pressures of the presidency and felt it was his moral duty not to make the job any harder. So, he adhered to the standard of grace and decency to which all former presidents should aspire.

For a while it seemed Obama — the beneficiary of Bush’s grace and decency — would follow the 43rd president’s example. But a little more than 18 months after leaving office, Obama has apparently decided that he is too important to stay on the sidelines.

Obama broke his silence in a speech to students at the University of Illinois at Urbana-Champaign, where he declared that he had fully intended “on following a wise American tradition of ex-presidents gracefully exiting the political stage” but changed his mind because “this is one of those pivotal moments when every one of us as citizens of the United States need to determine just who it is that we are.” (With all due respect, this is exactly how many conservatives felt about his time in office.)

Rather than maintain even some semblance of presidential dignity — rallying Democrats around a set of principles without attacking the sitting president — Obama launched into an unrestrained, full-frontal assault on his successor. President Trump, Obama warned, is a “threat to our democracy” who rose to power by “tapping into America’s dark history of racial and ethnic and religious division.” The former president castigated not just Trump but all Republicans.

“The politics of division and resentment and paranoia has unfortunately found a home in the Republican party,” he declared. Republicans are “subsidizing corporate polluters,” “weakening worker protections,” “shrinking the safety net,” “attack[ing] voting rights” and “cozying up to Russia” — all while appealing to “racial nationalism that’s barely veiled.”

It was the most hyperpartisan speech delivered by a former president in modern memory. If Obama were concerned that Trump is behaving in a manner beneath the dignity of his office, then the answer is to set a better example for presidential behavior — not join him.

And what is Obama’s message? “When you hear how great the economy is doing right now,” Obama said, “let’s just remember when this recovery started.” Ironically, that was precisely the message that drove Obama voters to Trump in 2016. Polls show that in 2016, half of Obama-Trump voters said their incomes were falling behind the cost of living, while another 31 percent said their incomes were merely keeping pace.

Democrats like to talk about all the hallowed presidential norms that Trump is breaking. But now it is Obama who is breaking presidential norms with his self-serving foray into partisan demagoguery.

Marc A. Thiessen served as a speechwriter for President George W. Bush and Secretary of Defense Donald Rumsfeld.