Editor's note: Julian Zelizer is a professor of history and public affairs at Princeton University. He is the author of "Jimmy Carter" (Times Books) and author of the book "Governing America" (Princeton University Press).
Princeton, New Jersey (CNN) -- The outcome of the election of 2012 is becoming even tougher to predict, since there are many political landmines facing both parties.
President Barack Obama has enjoyed a resurgence in his political standing, with polls showing him ahead of the GOP rivals in hypothetical matchups for the general election. Recent statistics showing an improving economy have bolstered the president's position, while his budget proposal and increasingly populist rhetoric have generated some excitement within the base of the Democratic Party.
On the Republican side, Mitt Romney remains the front-runner, though barely, still enjoying the kind of edge in campaign contributions that is essential to victory.
Yet both candidates, and both parties, are confronting threats that could cause huge swings in the outcome of the election.
The Democratic challenges come from outside the party.
For Obama, the biggest threat is Europe. Even though leaders have put bailout plans in place and nations have started to grapple with their budget problems, the governments of Greece, Italy and other nations remain fiscally unstable. If any of these countries should default, they could trigger the kind of financial chaos in world markets that could doom Obama's re-election bid.
The problem for the White House is that there are limits to what the U.S. can do other than watch as European governments struggle to resolve this collective problem.
Another lurking problem is Iran. As tensions keep escalating with the Iranian government, and between the Israelis and Iranians, the potential for an international crisis is clear. If the situation deteriorates, the politics could move in ether direction. On the one hand, there could be a rally-around-the-leader effect, bolstering the case for keeping Obama in office. Or it could open the president up to attack from the right if his handling of the crisis is questionable.
The administration must also wait to see what the Supreme Court decides on the president's health care plan. The court is expected to decide by early summer on the constitutionality of mandating that people must have health insurance. If it decides that the individual mandate is constitutional, the decision would greatly strengthen the president's political position.
But if the Supreme Court says this key portion of the plan is unconstitutional, the decision would lend support to Republicans who have criticized the president for expanding the role of government. Even if a negative decision energized the base of the Democratic Party, dismantling Obama's key policy accomplishment would be devastating to the White House.
Republicans face huge threats as well. Continued improvement in the economy would undercut Republican criticism about how the president has handled the marketplace.
But the most difficult threat for the GOP comes from within the party. Republicans are now engaged in a brutal, fratricidal war.
Few anticipated the effect that Newt Gingrich would have in this contest. For years, Democrats were known as the party unable to control its internal feuding.
Republicans typically gave the nomination to the person who had waited patiently in line, while Democrats acted like a dysfunctional family that was just as eager to destroy itself as they were to take on their GOP opponents.
This year, Gingrich and Rick Santorum have thrown a wrench into the Republican machine. Although some commentators focus on Gingrich's background as a professor, what is equally important is Gingrich the ruthless politician, who takes no prisoners and persists in battle until he no longer can.
Despite all the warnings that he has faced about the impact of his take-no-prisoners campaign against Romney, Gingrich has continued to launch political attacks on the Republican front-runner. Santorum has joined him in further wounding the former Massachusetts governor.
Romney, once seen as the most electable Republican, has seen his image transformed into a flip-flopping, liberal, vulture capitalist who might not even win in his own home state of Michigan.
The outcome of South Carolina and Minnesota contradicted the claim that he is the candidate who inevitably wins. He didn't. Santorum and Gingrich have effectively painted Romney as the "establishment Republican" despite the fact that they have been central to the party's leadership since the 1990s.
Given the current delegate count, and possible victories by Gingrich in Ohio and Santorum in Michigan, Republicans could be looking at a messy convention where these battles and tensions play out just before the fall campaign. The Republicans could face the kind of raucous convention that Democrats suffered through in 1968 when internal divisions brought down the party and gave Richard Nixon a commanding edge in the general election.
The situation is so unstable that the notion of a new candidate such as Sarah Palin or Chris Christie entering the mix is no longer impossible -- a throwback to the smoke-filled-room era of party politics where decisions were made at the convention. Nor can we rule out the chance of a third-party run that would siphon off GOP votes.
The uncertainty of the contest is likely to make for an extremely bruising campaign this fall, one that could leave both sides deeply wounded and generate even more bitter feelings within two parties whose members already detest each other.
In short, we're likely to face a campaign where events will continue to create the possibility of huge swings, dramatic twists and turns and rapid changes in the fortunes of all the candidates.
Follow CNN Opinion on Twitter
Join the conversation on Facebook
The opinions expressed in this commentary are solely those of Julian Zelizer.