Kabul, Afghanistan (CNN) -- Three Americans were killed in Afghanistan Saturday, NATO's International Security Assistance Force said.
Two of the U.S. service members died in a bombing in southern Afghanistan. The third death followed an insurgent attack in eastern Afghanistan. No other details were immediately available.
The casualties came as the top American diplomat and top U.S. general in Afghanistan reassured the troubled nation of U.S. support.
"Now looking ahead, we're all focused together on the upcoming parliamentary elections and the key test will be the satisfaction of the Afghan people with the progress that's going to come from their hard work as they approach the elections -- their incredible reputation for perseverance and their indomitable spirit," said Amb. Karl Eikenberry, speaking to Afghan journalists with Gen. David Petraeus.
Meanwhile, Afghan and coalition soldiers fought off assaults on two military bases that left more than 20 insurgents dead, ISAF said.
The fighting occurred in Khost province, a volatile region on Afghanistan's rugged border with Pakistan.
Insurgents clad in U.S. military uniforms and wielding rocket-propelled grenades and small arms "simultaneously launched attacks" against Forward Operating Base Salerno and Forward Operation Base Chapman, ISAF said.
Chapman is the same base where a suicide bomber killed seven CIA officers on December 30.
Troops killed about 15 insurgents at Salerno and six at Chapman. Five insurgent fighters were captured and were in ISAF custody.
A Haqqani network operative who helps carry out bombings and two other insurgents died in an airstrike while fleeing Salerno in a vehicle. Two insurgents who got into Salerno were killed by soldiers. The Haqqani network is a militant group with ties to al Qaeda.
"We are tightening our grip on the insurgents and as a result they are attempting anything and everything as a last ditch effort," said U.S. Army Col. Rafael Torres, ISAF spokesman. "The insurgents gave their best effort and came up short."
Afghan police and ISAF members seized a car bomb and a vehicle carrying ammunition. Forces also seized suicide vests, rifles and unexploded munitions.
Four ISAF soldiers were injured, and three have returned to duty. The fourth was set to return to duty soon. No base facilities were damaged.
Also Saturday, an Afghan civilian was killed by a suicide attacker in southeastern Paktika province, ISAF said. Seven people also were wounded when the insurgent detonated a suicide vest.
CNN's Joe Sterling contributed to this report.