Heavy fighting with the Taliban was reported in Baghlan province
A bomb in south Afghanistan has killed three people and injured 24, including foreigners, while four German soldiers were among seven killed in the north.
A suicide bomber targeted a security company based in a compound shared by foreign companies in the city of Kandahar, local police said.
British and American citizens are said to be among those wounded in the bombing.
The attack on German soldiers in Baghlan province also injured five.
Initial reports said three foreigners had been among those killed in the Kandahar blast, but these were later dismissed by US officials.
US embassy spokeswoman Caitlin Hayden said at least two Americans were among the wounded. Britain has said at least one British civilian was also hurt.
The nationalities of all the casualties have yet to be determined, Western officials said.
Reports say a suicide bomber drove a car past one barrier leading into a compound housing foreign companies, then set off the explosion at a second barrier.
The blast blew out windows more than 3km (2 miles) away and shook the compound, which includes the offices of the Afghanistan Stabilization Initiative, an aid programme.
Hours before the blast, a car bomb injured several people at a hotel in the same city.
On Monday, three suicide bombers tried to attack an intelligence compound in the city, leaving 10 people injured.
Kandahar is the main city of Afghanistan's volatile south. This week's attacks came after the Nato-led military coalition in Afghanistan said it would launch an offensive there in June.
Officials said some 10,000 troops would be involved in the operation to expel insurgents from the city - the birthplace of the Taliban.
Earlier, the UN special representative for Afghanistan, Staffan de Mistura, called for greater attention to civilian safety following the deaths of four Afghans who died on Monday when the bus in which they were travelling was fired on by US troops near Kandahar.
The US military has said it regrets the incident.
Germany's defence ministry in Berlin confirmed the deaths of its soldiers in the northern province of Baghlan.
They died when a rocket hit their Eagle armoured vehicle during heavy fighting with Taliban militants, about 190km (120 miles) north of the capital, Kabul.
It was the biggest single-day loss of life suffered by the Germans since June 2003, when four soldiers were killed and 29 wounded in a bombing near Kabul airport.
Provincial police spokesman Habib Rahman said three Afghan policemen had also died in Thursday's fighting, which involved air strikes and the use of heavy weapons.
Germany's contingent, which comprises 4,300 personnel and is the third-biggest after the US and British forces, lost three soldiers in a gun battle on 2 April in Kunduz province.
German troops accidentally killed six Afghan soldiers in the same battle.