HANOI (Reuters) - Protesters involved in a land dispute near Vietnam’s capital, Hanoi, released the final 20 officials they had been holding as hostages for almost a week after a visit by a senior city official, Reuters witnesses said on Saturday.

Villagers in Dong Tam, 40 km (25 miles) from the center of Hanoi, seized 38 officials, including police officers, last weekend after four people were arrested in retaliation for protests staged during the escalating land dispute.

Fifteen of the officials were released on Monday and another three escaped, while authorities also released the detained protesters.

Dong Tam villagers say they have received insufficient compensation by authorities who took over residential land for a telecommunications project.

The release of the final 20 officials came after a visit to the village earlier on Saturday by Hanoi’s People’s Committee Chairman Nguyen Duc Chung, who spoke with villagers and listened to their complaints.

Chung said the city would begin a comprehensive investigation of the dispute and promised to respond within 45 days. He also said none of the protesters would be prosecuted for taking the officials hostage, who he also said had been treated well.

The released hostages shook hands and hugged villagers, who applauded loudly after hearing Chung’s commitment.

“We are very happy. Dong Tam village is freed,” Nguyen Thi Loan, a villager who was responsible for taking care of the hostages, told Reuters.

“Finally I can come home with my husband tonight,” she said.

Another villager said: “We are really looking forward to the result of the inspection and that the authority will help bring justice to us.”

Land disputes are common in Vietnam but it is rare for residents to take officials hostage in the communist state, where there is little tolerance for dissent.

(This version of the story has been refiled to add dropped word “after” to headline)