Hamas said on Monday it had agreed to release those arrested in connection with protests over severe electricity shortages that prompted an outpouring of anger Gaza.
The interior ministry in Gaza said in a statement quoted by AFP that the decision was made after a meeting between security chiefs and political movements in the region.
It did not say how many people were being released, but rights activists said it involved dozens of people.
A series of protests were held in Gaza over the past two weeks, including one on Thursday when thousands in northern Gaza walked to the local headquarters of the electricity company.
Security forces dispersed the protesters violently, with shots fired in the air and a number of journalists beaten up, reported AFP.
A prominent comedian was also detained on Wednesday after he posted on social media a call for Hamas to give up power.
On Monday, a 20-year-old Gazan man set himself ablaze in protest of the electricity shortage. He was taken to a Gaza hospital in serious condition.
Gaza had been left with around four hours of electricity per day as winter temperatures drove a spike in demand.
The frequent power outages in Gaza have been ongoing for several years, and are mostly due to ongoing disputes between Hamas and its longtime rival, the Fatah movement headed by Palestinian Authority (PA) chairman Mahmoud Abbas.
Gaza’s electricity authority said Monday it was returning to providing power in eight-hour intervals after Qatar pledged $12 million toward resolving the problem.
Turkey has also offered to help Gaza with the electricity shortage.