PARIS — President Nicolas Sarkozy of France suspended military training and assistance for Afghan forces on Friday and said he would consider an early withdrawal from Afghanistan after an Afghan soldier shot and killed four French soldiers on a base in eastern Afghanistan.

The attack was the latest in a series of episodes in which Afghan soldiers or police officers, or insurgents wearing official uniforms, have opened fire on soldiers of the American-led coalition in Afghanistan.

The killings are intended to sap Western morale and hasten the withdrawal of foreign troops from Afghanistan sooner than an agreed NATO deadline of the end of 2014, when Afghan forces are supposed to be ready to defend the country on their own. A rising number of the attacks have also been born of simmering animosity between coalition forces and the Afghan soldiers they fight alongside and train.

With many European countries facing unprecedented economic pressures at home, such attacks by Afghan soldiers on foreign troops have added to public questioning of the value of continued involvement in Afghanistan. If France were to reduce its troops early or precipitously, it could spur other countries to follow suit, Western and Afghan officials warned.