The president who once mused about a president attacking Iran to win reelection has now inched closer to war with Iran — in his own reelection year.

But if President Trump truly thinks a new war in the Middle East might help him win, he might want to think again.

Ever since the controversial decision to kill a high-ranking Iranian military official in Baghdad on Thursday, Trump’s critics have anxiously pointed to his past commentary on the politics of war with Iran. Trump repeatedly in 2011 and 2012 predicted Barack Obama would attack Iran because it was the only way he would be reelected. Trump was doubly wrong: The attack never came, and Obama won comfortably anyway.

But as he confronts his own difficult reelection math and a standoff with Iran, it’s worth considering whether Trump might be making a similar calculation for himself — however cynical that thought might be.

What we can say at this point: There’s little reason to believe it would help.

Pollsters and political analysts often talk about a “rally around the flag” effect that comes when the United States is attacked or launches new military campaigns. And there is something to that. But it’s often quite short-lived, and there’s little evidence it has actually helped any recent president win reelection.

The most recent example would be the Iraq War, which George W. Bush launched in March 2003. According to Gallup data, his approval rating increased from 58 percent just before the invasion to 71 percent immediately afterward. But it was back to 58 percent just four months later, and despite the capture of Saddam Hussein in late 2003, on the eve of the 2004 election it stood at 48 percent.

Approval of the war was middling by then, with exit polls showing 51 percent approved of the decision to go to war, but 52 percent felt it was going “badly.” While Bush won reelection, the war wasn’t viewed as an asset, and it eventually became a black mark on his legacy.

His father got an even bigger bump from his own decision to go to war in Iraq. After the launch of Operation Desert Storm in January 1991, George H.W. Bush’s approval rating shot up from 64 percent to 82 percent — and eventually to an astounding 89 percent after the success of the mission became fully evident. He even got a three-minute standing ovation in a March 1991 address to Congress.

At the time, it was scaring potential Democratic opponents away, with one poll showing Bush leading then-New York Gov. Mario Cuomo, the supposed great Democratic hope, by 62 points. Democrats were “fairly resigned to the idea that the 1992 presidential election was decided during Operation Desert Storm,” The Washington Post’s Mary McGrory wrote in mid-March 1991.

The bump was gone by October 1991, though, and Bush was under 50 percent by January 1992, a year after the war’s launch. He stayed there until losing reelection to Bill Clinton.

Lyndon Johnson won the 1964 presidential race after assuming the presidency in 1963 and the passage of the Gulf of Tonkin Resolution, which formalized U.S. involvement in Vietnam, in August 1964. But he didn’t realize any noticeable bounce from the entry into the war shortly before the election, and he was already hugely popular, with an approval rating above 70 percent. The war soon bogged down his first full term, and he opted not to seek reelection in 1968 in large part because of Vietnam.

On a smaller scale, the invasion of Granada in October 1983 doesn’t seem to have moved the needle for Ronald Reagan, even as he easily won reelection in 1984. His approval rating ticked up over 50 percent afterward, but as Gallup notes, that appeared to owe to a terrorist explosion that killed 241 American Marines in Beirut the same month and, perhaps most importantly, a surging economy.

Fast forward to today, and there is little evidence of a desire for war with Iran. A Gallup poll in July showed just 18 percent favored military action there, and that number only went up to 42 percent if diplomatic efforts failed to shut down Iran’s nuclear program. Another poll showed 57 percent opposed military action unless Iran attacked the United States first.

Those numbers could always change with the circumstances; at the time of the July poll, for example, the most recent major event was Iran sending fuel products to Syria. But there is little reason to believe a new war would create such a rallying effect. One reason is war fatigue from the prolonged efforts in Iraq and Afghanistan — events that Trump himself has said epitomize the need to get out of the Middle East. The other is the fact that almost nothing has moved Trump’s approval rating. It has stood in the high 30s or low 40s for pretty much his entire tenure.

Combine that with the amount of time until the election and the unpredictability of war with a developed country like Iran, and history suggests that Trump might want to reflect on how wrong he was in 2011 and 2012.