Neither of them mentioned President Trump by name but two of his predecessors emerged from political seclusion on Thursday to deliver what sounded like pointed rebukes of the current occupant of the Oval Office and the forces of division that propelled him to power.

In separate and unrelated appearances, former Presidents George W. Bush and Barack Obama both warned that the United States was being torn apart by ancient hatreds that should have been consigned to history long ago and called for addressing economic anxiety through common purpose. While not directly addressing Mr. Trump, neither left much doubt whom and what they had in mind.

Mr. Bush, the last Republican to hold the White House, spoke out at a conference he convened in New York to support democracy, noting that America first had to “recover our own identity” in the face of challenges to its most basic ideals. While Mr. Trump seeks to raise barriers to trade and newcomers, lashing out at targets with relish, Mr. Bush defended immigration and free trade, denounced nationalism and bigotry and bemoaned what he called the “casual cruelty” of current public discourse.

“We’ve seen nationalism distorted into nativism, forgotten the dynamism that immigration has always brought to America,” Mr. Bush said. “We see a fading confidence in the value of free markets and international trade, forgetting that conflict, instability and poverty follow in the wake of protectionism. We’ve seen the return of isolationist sentiments, forgetting that American security is directly threatened by the chaos and despair of distant places.”