Image: Hangs exchanging money in front of a U.S. flag © Plush , DH Kong, Blend Images, Corbis

The historic market rally we've seen over the past few months, in the midst of a deteriorating economy, has been the product of a special set of circumstances.

Market sentiment has reached extreme levels of overconfidence, with small retail traders and professional fund managers all joining in. The economic numbers, while trending lower, have been scattershot enough not to scare the bulls. Fourth-quarter earnings have been trending lower, but slowly enough not to attract attention. The budget battle in Washington has moved to the back burner. Japan is aggressively pumping cheap money into the global economy. And the eurozone crisis has calmed, thanks to temporary political tranquility there.

But the one wild card the market cheerleaders didn't expect to spoil the fun is now in play: politics. In the U.S. and in Europe, scandals, infighting, protests and looming fights over issues like taxes and spending are set to remind the market that not all is solved and that deep structural economic problems remain.

And all that squabbling will peel back the thin veneer that has pushed the Dow Jones Industrial Average ($INDU) past 14,000 and end the rally. Here's why.

Scandal in Europe

The first wrinkles started to appear in Europe earlier this week as the borrowing costs faced by Spain and Italy -- which had been moving lower since last summer on an alleviation of eurozone breakup fears -- started to move higher.

Meanwhile, Europe's economic fundamentals have deteriorated as a strong euro has pinched export competitiveness.

More importantly, important, technocratic, austerity-minded leaders in Italy and Spain are under pressure amid scandal allegations.

In Spain, scandal threatens to bring down the government of Prime Minister Mariano Rajoy, who is accused, along with senior party officials, of receiving illegal cash payments from a construction company in exchange for public contracts. As the scandal has spread, more party officials have come forward to support the claims. And, during a press conference with German Chancellor Angela Merkel, both were visibility flustered as Rajoy admitted some of the things reported about him were true, without specifying which ones.

Anthony Mirhaydari

Anthony Mirhaydari

This is a problem, because Spain has already fallen behind its budget-consolidation targets as a weak economy, 56% youth unemployment and a restive population limit the effectiveness of austerity measures. Protesters have returned to the streets. It's being reported that a weakened Rajoy will demand more time from eurozone officials to meet Spain's deficit-to-gross-domestic-product target.

Political tumult now, with the opposition Socialist Party already calling for Rajoy's resignation, not only would threaten austerity efforts and relations with eurozone creditors such as Germany, but also would jeopardize efforts to solidify the finances of Spain's vulnerable banks. All of this increases the chance that Spain will request a formal bailout, once again raising the prospect of a eurozone breakup.

The economy there is in dire straits. In December, house prices fell nearly 10% year over year, industrial output fell nearly 7% from the same period the year before, and retail sales fell 10.2% year over year.

In Italy, Prime Minister Mario Monti, who is slipping in the polls ahead of elections later this month, is under fire as one of the country's largest banks crumbles in what looks to be an oversight failure -- requiring a taxpayer-funded bailout while the country faces near-40% youth unemployment, higher taxes and less spending. The bank, which has ties to the center-left ruling party and was already in need of a $5.3 billion bailout -- approved, but still being implemented -- is facing additional losses totaling nearly $1 billion after dabbling in derivatives trading.

Italians are angry; the first bailout was an amount equal to an unpopular new housing tax -- increasing the perception that everyday Italians are paying to save politically connected fat-cat bankers. This is increasing the strength of former conservative Prime Minister Silvio Berlusconi in the polls -- a man who had rejected eurozone calls for budget cuts and is promising tax cuts if elected.

Both situations are threatening the pro-austerity unity in the eurozone and disrupting the relative calm that had settled into the markets there. No wonder the Spanish stock market has returned to early December levels. For investors here at home, any eurozone fallout will weaken the euro, strengthen the dollar and jeopardize dollar-sensitive assets like commodities and emerging-market stocks, as well as risky assets in general.

Washington saber-rattling

In the wake of the kick-the-can fiscal cliff deal over the New Year's holiday, Wall Street has taken a break from worrying about U.S. budget deadlines and the tough decisions on issues like taxes and spending that are required to solve it.

The reprieve is almost over. At the end of the month, the country faces an additional $1 trillion in spending cuts (over 10 years) in the form of the budget sequestration, half of which will hit the Pentagon. It's worth noting that the reason fourth-quarter GDP came in at -0.1% was big cuts in defense spending, which the bulls said would prove temporary. As it's structured now, the sequester will make this anything but temporary.

Then, at the end of March, we face the end of the continuing budget resolution that keeps the government running. Unless Democrats and Republicans can agree on new spending plans, we face the prospect of a partial government shutdown. Republicans are working on a tough budget that, they say, will kill the deficit within 10 years. And they were able to get Senate Democrats and President Barack Obama to agree to their "No Budget, No Pay" plan that requires both houses of Congress to pass a budget plan or face having their pay withheld.

So budget plans are coming. Obama has missed his Feb. 4 deadline to file the White House budget proposal, but he will need to release it soon.

After all that, the debt ceiling looms again in May. And Obama is calling for a short-term delay in the scheduled sequester cuts -- featuring tens of billions in taxes and spending -- to give Washington more time to find $1 trillion in spending cuts.

Because the budget is the one issue Republicans feel they can take a strong stand on, given Americans' feelings on taxes and the debt ceiling, expect another big battle, renewed brinkmanship and more political blood sport. Citigroup strategist Steven Englander believes Wall Street faces a repeat of the reaction to the2011 debt-ceiling fight:complacency first, then horror.