A man has been shot dead by his cousin in an apparent accident in northern Jordan on the day the victim was released from prison.

A video that circulated on social media on Tuesday showed Sari Salem Wardat, 46, being shot in the head as he was walking towards his house as a crowd of family members and neighbours had gathered to welcome him.

More:

Police and family members confirmed that the incident took place on Monday and the shooter has been identified as the victim's distant cousin Ahmad Salamah Wardat.

In the video, Sari arrives in a blue car amid a hail of off-screen celebratory gunfire. Sari exits the car and is approached by Ahmad, who points a handgun skywards. The weapon appears to jam twice before Ahmad fires a shot, after which it appears to jam again before he fires six shots into the air. Then as the two men walk along the road, Ahmad appears to fiddle with the gun and fires one more shot at Sari, who immediately drops to the road.

The incident took place in the town of Amrawah, about 100 kilometres (60 miles) north of the capital, Amman, close to the country's border with Syria. The roughly 9,000 residents of the town are mostly from the same Wardat clan.

Sari, a father of five, had been serving an eight-month prison sentence for carrying an unlicensed weapon and resisting arrest, according to police and relatives, and was released two weeks early in line with special government measures to combat the spread of the novel coronavirus in Jordan.

In addition to imposing a tight lockdown last month in an attempt to contain the coronavirus outbreak in the country, the government has ordered the early release of some prisoners. All public gatherings are prohibited under the measures.

Police sources told Al Jazeera that Sari was a drug dealer and smuggler, an account that was confirmed by family members on the condition of anonymity because of the sensitivity of the matter.

Ahmad Wardat is a member of Jordanian Armed Forces. Relatives who witnessed the shooting said he was using a seven-millimetre modified gun that frequently jammed.

The relatives said that Ahmad "was not very bright". They described a separate occasion several years ago when he fired a pump-action pellet shotgun during a wedding, wounding six people.

Relatives said the shooter said he thought he had fired all of his bullets not knowing that the last bullet had jammed in the magazine that killed Sari.

'Tribal peace deal'

Hassan Wardat, a distant relative of both men and a local imam, told Al Jazeera by phone from Amrawah that the families of both men struck an " Atwa" or a tribal peace agreement, after the shooting to prevent a potential "revenge killing" against the family of the shooter.

"Immediately after the shooting, Awad, Sari’s brother, stood among the gathered crowd and said he forgave the shooter and his family for his brother's blood," Hassan said.

"This was done in the interests of peace between the different branches of the clan especially during this time."

Jawdat Darabseh, a member of parliament who represents Irbid province and is familiar with the clans of Amrawah, told Al Jazeera that he intervened to formalise the agreement between the family branches of the victim and the shooter, in order stop potential further disputes in the town.

"Upon hearing of what happened I immediately contacted the security officials in the area and got permission to have limited meetings between the families," he said.

The shooter has been detained and will likely face a murder charge, the police said.

Follow Ali Younes on Twitter: @ali_reports