KANDAHAR, Afghanistan — Dozens of Afghan forces and Taliban fighters were killed in overnight fighting across Afghanistan, officials said Tuesday, as violence intensified ahead of another round of peace efforts to end the 18-year-old war.

The worst of the attacks were in Kandahar Province, where the Taliban targeted an Afghan border post late Monday, killing at least four service members, according to local officials. Kasim Azad, the secretary of Kandahar’s police chief, confirmed the attack and said four members of the border forces were killed.

But other officials put the death toll as high as 18 and said that at least eight other people were unaccounted for, possibly taken by the Taliban. Mr. Azad said 17 Taliban fighters had also been killed. The Taliban claimed to have overrun the border post, but the Afghan defense ministry said all of the attacked border posts remained under government control.

The violence comes a day after three American soldiers were killed near Bagram Air Base outside Kabul. Although Defense Department officials initially said that a contractor had also been killed in the attack, on Tuesday they revised their account to say that the contractor had only been wounded.