MAZAR-I-SHARIF, Afghanistan — At least 27 members of security forces in northern Afghanistan were killed by the Taliban in a series of coordinated attacks on Tuesday, officials said, and dozens of others were wounded.

The deadliest violence took place in Sar-i-Pul Province, where the Taliban attacked Afghan security forces in three areas, killing a total of 21 people, officials said. The officials did not provide a breakdown of casualties.

Zabihullah Amani, the spokesman for the governor of Sar-i-Pul, said the Taliban had simultaneously attacked the center of Sayad District, security outposts along the highway linking Sar-i-Pul with Jowzjan, and a village with oil wells.

“It was a very strong attack,” Mr. Amani said. “Two security outposts were captured by the Taliban; 25 members of security forces were also wounded during the clashes.”