The patrol, which was part of the international ISAF force and also included Finnish soldiers, arrived at the village of Boka in Balkh province to meet Afghan representatives at around 11.40am local time.
Around 15-30 Afghans attacked the patrol and not until around 1pm did reinforcements arrive, allowing the Swedes to withdraw from the area.
The Swedish Armed Forces said that it is still unclear if any Afghans were wounded or killed as the Swedes fired back.
Two days ago another Swedish patrol in a different province in northern Afghanistan was attacked. Trouble flared up when the troops tried to arrest a suspected criminal.
But the statement from the Armed Forces on Tuesday gave no indication of the cause of the latest attack.
The Nato-led ISAF force has faced most difficulty in peacekeeping duties in the south of the country. So far the north of Afghanistan, where the Swedish troops are stationed, has remained calmer.