Conflict between the al-Qaeda-linked al-Shabab, which wants to implement a strict implementation of sharia, or Islamic law, and the central government has killed thousands of people since 2006.
The attack in the town of Gariley in the southern Gedo region happened when militants attacked the crew at its work site, burning their bodies and drilling equipment, said Mahad Abdi, a local resident who visited the scene and counted the bodies.
"I am very sorry that al-Shabab is causing such trouble for us while we are suffering from drought and lack of water in our area and we don't want water 100 km away from us," Abdi told Reuters.
The area is suffering from the Horn of Africa's worst drought in 40 years, leading the United Nations to warn of a looming famine.
Somali security forces say they have made gains on the battlefield in recent weeks while fighting alongside local self-defense groups, but that hasn't stopped al-Shabab's deadly raids.
Mahmoud Abdel Warsame, the mayor of Gariley, confirmed the death toll and said security forces also killed six al-Shabab fighters.
Al-Shabab has in recent weeks burned houses, destroyed wells and beheaded civilians in other parts of central and southern Somalia, residents say.
The attacks, and the group's demands for tax payments despite the drought, have pushed some residents to take up arms against al-Shabab.
In a separate incident in the capital Mogadishu, al-Shabab fighters killed Mogadishu's head of police, his two bodyguards and a police-based journalist, President Hassan sheik Mohamud was reported as saying on Somali National News Agency.