Associated Press
France's President Nicolas Sarkozy, center, gestures a he talks to workers as at a factory of the Groupe SEB, a leading worldwide manufacturer of small domestic appliances and cookware in Pont-Eveque, central France, Thursday, Jan. 19, 2012. (AP Photo/Michel Euler)

PARIS — An unpopular leader entangled in an unpopular war that he once staunchly defended, President Nicolas Sarkozy is suddenly considering a pullout of French troops from Afghanistan as another kind of campaign approaches: For his own re-election.

The killing Friday of four French troops by one of their Afghan trainees upended Sarkozy's counterterrorism strategy, leading him to immediately suspend France's training program and joint military patrols and raise the prospect of an accelerated pullout from Afghanistan.

Afghanistan is not at the center of France's presidential race, which culminates in a two-round vote in April and May. But for Sarkozy, the war looms as uncomfortable background noise amid wider French public concerns about swelling state debts and joblessness at its highest in over a decade.

On Afghanistan, he's been on the defensive: Francois Hollande, the Socialist nominee for the presidential election, wants a pullout soon — a position supported by most French, according to polls.

Sarkozy has not formally announced whether he will run, but nearly all political observers expect he will. Polls show him trailing Hollande, and he has widely been seen as battling on all fronts to boost his lagging popularity.

A brash and impulsive leader, Sarkozy has had several successes in the international arena — notably with French interventions in countries like Libya and Ivory Coast. But he has struggled to parlay them into political capital at a time when pocketbook issues are on the minds of most French.

Sarkozy, who took office in 2007, inherited France's participation in Afghanistan long after it began with the international coalition a decade ago, but repeatedly invoked it as important to helping keep France safe.

Time after time, as French soldiers fell in combat on Afghan land — including 26 last year alone — Sarkozy insisted France wouldn't walk away from the fight. He pegged the eventual French withdrawal from Afghanistan to President Barack Obama's planned pullout timetable for U.S. troops of 2014.

After Friday's shootings, France may now break ranks on that.

Speaking to French diplomats Friday, Sarkozy said that if security conditions for the country's troops in Afghanistan cannot be restored, "then the question of an early withdrawal of the French army would arise."

He said French troops were in Afghanistan to help Afghans fight terrorism and the Taliban, and "The French army is not in Afghanistan so that Afghan soldiers can shoot at them."

Parsing Sarkozy's comments, strategic affairs analyst Francois Heisbourg said: "I think it's pretty clear that this is a prelude to anticipated withdrawal, without waiting for 2014."