KABUL, Afghanistan — Violence took the lives of at least two dozen Afghan civilians and possibly many more on Wednesday, making it the deadliest day for Afghan civilians so far this year. The day included a complex suicide attack in Kandahar City and a NATO airstrike that Afghan officials and residents said had killed women and children in eastern Afghanistan.

Last week, the head of the United Nations Afghanistan office, Jan Kubis, said that in the first quarter of this year, civilian casualties had dropped for the first time since the United Nations began keeping statistics in 2007. That positive trend has appeared to be eroding in recent days. Another official in the office, James Rodehaver, said, “One thing we can say is that this has been the deadliest day of the year so far for civilians.”

The civilian deaths said to have been caused by a NATO airstrike took place in rural Logar Province, and for much of the day there were conflicting accounts of what had happened. By evening a NATO spokesman said that international forces and the Afghans had opened a joint investigation.

According to Logar residents, including health workers who received the bodies of the dead, Western Special Operations forces, working with their Afghan counterparts, received word that a Taliban commander was using a civilian home for the night with some of his fighters. The joint force prepared to attack the house. As the forces approached, they came under fire from the Taliban and called in the airstrike, said Din Mohammed Darwish, the spokesman for the governor of Logar.