The early morning attack, which triggered a fire-fight with security forces, happened in the city of Kunduz at a building formerly used as a German-run guesthouse. Nine civilians and a policeman were also injured, said provincial spokesman Mahboobullah Shahedi.
Two Germans working for the security firm, Kaboora, left the building half an hour beforehand but there were no foreign nationals inside when the attack happened, deputy provincial police Chief Abdul Rahman Aqtash added.
The Germans were now being questioned by police about what had happened, Aqtash said, adding the building had been used as a guesthouse until about a month ago.
The Taliban sent a text message claiming responsibility for the attack on the security company, which is thought to work with Western organisations.
It is the first major strike by insurgents in Afghanistan since the start of the holy month of Ramadan Monday.
One suicide bomber detonated a car bomb at the entrance to the office, allowing the other two to get inside, Shahedi said.
"Three guards were killed, nine civilians were injured and one policeman was injured in the blast and fighting," he said.
Aqtash said fighting had finished after two remaining bombers blew themselves up inside the office in quick succession.
He confirmed the toll given by Shahedi and explained that the nine wounded civilians were residents of a nearby house who were hurt by the initial car bomb blast.
The Afghan interior ministry issued a statement condemning the attack "in the strongest terms."
The north of Afghanistan has traditionally been more secure than south and east of the country, which have suffered much of the worst violence in the near decade-long Taliban-led insurgency.
But a string of violent episodes in recent months, including May's killing of northern Afghanistan's influential police commander in the province of Takhar, which borders Kunduz, have raised fears about the area's stability.
There are currently around 140,000 international troops in Afghanistan battling Taliban but limited withdrawals have already started ahead of a deadline for all foreign combat troops to leave by the end of 2014.
German forces have a strong presence in northern Afghanistan and have a major base at Kunduz. There are currently around 4,800 German troops serving in Afghanistan as part of a NATO-led international force.
Copyright AFP (Agence France-Presse), 2011