At least 28 guests at a wedding celebration were killed on Wednesday night after Afghan soldiers accidentally fired rockets from two directions into a house in Afghanistan's southern Sangin district in Helmand province.

The incident occurred on the eve of the official end of the US-NATO joint mission, and hours before Afghan soldiers took over security oversight of the landlocked Central Asian country.

Most of the dead and wounded were women and children. A further 51 people were injured when the artillery hit the wedding party, officials told the Associated Press.

Deputy Afghan Defense Ministry spokesman Gen. Dawlat Waziri said Friday that a team of investigators had been sent to the volatile region, where the government military and Taliban have been clashing with each other frequently in the last six months since most foreign troops withdrew from the area. Two soldiers have been arrested for alleged roles in the incident, with another eight still under investigation.

Abdul Haleem, a cousin of the bride, told the AP that the explosion hit his home, where the party was being held.

"Nine children of mine are missing; I just collected body parts," he said. "I don't know whether it's my children or someone else."

A police spokesman said the rocket attack was an attempted retaliation for a Taliban assault on an army headquarters in Sangin, according to the Guardian. The militants reportedly took shelter near the wedding party when the Afghan soldiers launched the rocket.

The 13-year international military mission in Afghanistan concluded this week following a NATO flag-lowering ceremony in Kabul, leading the Taliban to declare victory and the defeat of coalition forces. Wednesday marked the official last day of the US-NATO mission.

Some 13,000 troops from NATO's International Security Assistance Force (ISAF) — most of them American — will remain in Afghanistan to help train Afghanistan's some 350,000-strong local security forces, which will be severely tested by ongoing insurgent violence in coming months.

This week saw ongoing violence in the area, with four people, including three bank employees and a policeman killed after a roadside bomb took out a bank vehicle in the capital of Helmand, a province official told the Associated Press.

On Monday, the Taliban assaulted an Afghan army checkpoint in Sangin, injuring three Afghan soldiers, and attacked another checkpoint in Helmand, killing four soldiers.

More than 4,600 Afghan soldiers and police officers were killed in 2014, making it one of the most deadly years ever recorded since the UN began keeping figures in 2008. Approximately 3,200 Afghan civilians were also killed in the fighting between the Afghan government and the Taliban.

Kayla Ruble contributed to this report.