ALGIERS (Reuters) - Algeria’s President Abdelaziz Bouteflika released on Monday five senior generals who were detained last month on charges of wrongdoing, a source familiar with the matter told Reuters.

The generals included three regional commanders sacked as part of a sweep by Bouteflika who has dismissed about a dozen generals this year, cementing his grip on power and easing the influence of the once dominant military.

Observers said the release was seen as a gesture by Bouteflika to improve relations with the military a few months ahead of a presidential election due in April, 2019.

The five generals are still being investigated, the source said. They were released from Blida military prison in the afternoon after being arrested on Oct. 14.

Bouteflika, 81, has not yet said whether he will heed calls by the ruling party to run for a fifth term next year. He would be expected to win as Algeria’s opposition remains fragmented.