Jimmy Carter used to be one of President Donald Trump ’s favorite political targets, a catchall foil for feckless Democrats that he could jeer at to make himself look strong and decisive.

But lately, Trump’s sentiments on the 39th president have become more wistful as he faces some of the same challenges the late Carter did.

Those include the war in Iran with no end in sight — and now escalating as the U.S. moves to control the Strait of Hormuz — and inflation, a drag on the economy Trump hasn’t tamed despite long insisting that his business background would wipe it out.

The comparison seems to be on Trump’s mind, too. Asked last month why he didn’t dispatch U.S. Special Forces into Iran to forcibly remove its enriched uranium, he responded, “I didn’t feel like being Jimmy Carter.”

That recalled the failed 1980 raid to free U.S. hostages that killed eight American servicemen. Trump also said in March that the unsuccessful mission “cost them the election” against Ronald Reagan in 1980, sounding cognizant of political realities in a way he didn’t when using Carter as a punchline.