The Taliban on Saturday claimed responsibility for an attack in eastern Afghanistan that the group said was part of its newly announced spring offensive.
According to Afghan officials, Taliban fighters on Friday night detonated two truck bombs in the Shirzad district of Nangarhar province, east of Kabul.
The assault came hours after the Taliban announced the start of Operation Fath, the name the militants have given to this year's spring offensive.
"Both sides have sustained casualties," the Afghan defence ministry said.
"Clashes are ongoing between (Afghan security forces) and Taliban terrorists."
The Taliban, who frequently exaggerate numbers, claimed to have killed or wounded "more than 200 soldiers, police and militias".
Nangarhar provincial governor spokesman Ataullah Khogyani said two Afghan troops had been killed, along with 27 Taliban fighters.
Another Taliban attack was reported around the edges of the northern city of Kunduz, which the militants briefly captured in 2015.
Naeem Mangal, head of the Kunduz regional hospital, told AFP at least eight people were killed and 62 wounded.
In Ghor province in the west, at least seven Afghan security forces were killed in a Taliban ambush, Ghor provincial governor spokesman Abdul Hai Khatibi told AFP.
Afghan President Ashraf Ghani's palace on Saturday condemned "in the strongest words" the announcement of Operation Fath.
"The continuation of war is no one's interest," the palace said.
The spring offensive traditionally marks the start of the so-called fighting season, though in reality fighting in recent winters has continued unabated.
The United States is leading a push to forge a settlement with the Taliban, after nearly 18 years of war, and has held several meetings with Taliban officials.
Later this month, Taliban officials are expected to meet with Afghanistan representatives, including some officials from the Kabul government, in the Qatari capital Doha.
The Taliban have long refused to speak officially with Kabul, dubbing the government a "puppet" of the West, and the militants have insisted that government officials are attending only in a "personal capacity".
The United Nations last week said it had lifted travel bans for 11 Taliban delegates, including Mullah Abdul Ghani Baradar, a cofounder of the Islamist movement and its top political leader, as well as Sher Mohammad Abbas Stanikzai, the Taliban's former deputy minister of foreign affairs.
"The requested exemption is solely for travels required for participation in peace and reconciliation discussions," the UN Security Council said.