The exchange in the southwest Yemen city, held by forces that back the government of President Abedrabbo Mansour Hadi but long surrounded by Houthi rebels, came after tribal mediation, one of the sources said.
The rebels freed 75 hostages in exchange for loyalist forces releasing 60 rebels, the source added.
The trade is the latest in a string of prisoner swaps and release deals since a 2018 United Nations-mediated agreement to exchange some 15,000 prisoners.
The landmark agreement signed in Sweden in December last year was hailed as Yemen's best chance so far to end a war that has pushed the country to the brink of famine and left tens of thousands dead, according to aid groups.
On Tuesday, 11 prisoners (five loyalist soldiers and six rebels) were exchanged in the northern governorate of Jawf following another tribal mediation, according to a military source.
The International Committee of the Red Cross (ICRC) in November repatriated to Houthi-held Sanaa 128 Yemeni rebels freed by Saudi Arabia, which leads a military coalition against the insurgents.
That came after the rebels released 290 prisoners in late September, the ICRC said.
Follow us and to stay connected