The guards have long abandoned their posts at Peniche fortress, leaving sentry duty to the seagulls and cormorants that speckle its ancient battlements.

Around and beneath the birds are builders in hardhats and hi-vis vests, civil servants, the occasional architect and an old man who is delighted to see the most notorious political prison of the Portuguese dictatorship stir back to life as a stone-and-concrete testimony to its own many and varied cruelties.

Few people know Peniche better than Domingos Abrantes. The communist politician, now 83 and a member of Portugal’s council of state, spent 12 years in prison under the authoritarian Estado Novo regime of António de Oliveira Salazar.

Nine of them were served in Peniche, a 16th-century fortress that was used as a jail for dissidents and opponents of the regime between 1934 and 1974.

“People used to say this was the worst of the fascist prisons,” says Abrantes. “It was the only prison where people were held in individual cells. The whole system here was designed to make everything hard. We didn’t have any books and most of the time were were in isolation and couldn’t speak to each other.”

On 27 April – the 45th anniversary of the prison’s closing following the Carnation revolution – the fortress will reopen as the National Museum of Resistance and Freedom.

An inaugural exhibition will take place alongside the unveiling of a memory wall inscribed with the names of the 2,500 people who passed through its gates under the Estado Novo.

The Portuguese government stepped in two years ago after plans to turn part of the fort into a hotel provoked anger from the people of Peniche, which lies an hour north-west of Lisbon.

Although there are smaller museums dedicated to prisoners of the regime in the capital, in Oporto and on Cape Verde, the Peniche project will be the first national centre and is intended to teach people about the country’s past.

“For us, this is a way to show younger generations what the country was like under fascism,” says Paula Araújo da Silva, the government’s head of cultural heritage. “We want it to be a lesson for children. We want schools to come here and to see what was here so that it doesn’t happen again.”

With the far right once again rising in Europe, the museum’s role is crucial, she adds.

Abrantes is one of the former prisoners who have shared their recollections of Peniche as part of the historical memory project.

Decades after he was released, the prison’s geography and petty routines remain fresh in his mind. He hops over duckboards and around piles of building materials to point out the spot from which a brave inmate intent on freedom plunged into the sea, the roof terrace where prisoners were allowed an hour of fresh air a day and the cold, wet and dark chamber used for solitary confinement.

The long, narrow cell where he spent seven solitary years remains much as it was – apart from the odd detail. The cupboard that housed his slopbucket is empty, his bed has gone and the drilling and shouts of workmen echo along the corridor.

The biggest difference, though, is the window. Mindful of the fort’s beautiful location high above the waves of the Atlantic, the authorities had cell windows whitewashed so prisoners were denied a view.

Former political prisoner Domingos Abrantes inside the fortress in Peniche. Photograph: Rafael Marchante/Reuters

Abrantes’ memories are of dozens of daily whistles and a similarly incessant brutality. “The whole system worked with whistles,” he says. “A whistle to get us up, to come to meals, to sit down, to come in from the recreation area, to go to our beds at night – all the orders were given by whistle.”

He remembers the guard who boasted of fighting in the Spanish civil war and belonging to a firing squad: “He used to say that having political prisoners was a waste of money.”

Chess was banned. One day, a guard came across a board drawn on the floor in chalk, and confiscated the stones the prisoners had been using as pieces. The inmate who called the guard a thief was punished with 17 days in solitary confinement.

“There was a permanent state of conflict between us and the guards,” says Abrantes. Worse still was the fact that the secret police could arbitrarily extend people’s original sentences for “security reasons”.

Some prisoners suffered mental breakdowns and some died in prison five or six years after completing their terms.

Abrantes says he preferred being in a single cell to being held in a group and that he even feels a certain sense of calm when he returns to the fortress.

But, standing in the room that was once the governor’s office, he remembers the day he was told to let a fellow prisoner know that his wife had killed herself. He puts a hand over his heart and turns away.

Portugal, like neighbouring Spain, is still struggling to come to terms with a long dictatorship.

“There’s been a policy of wiping out this memory,” he says. “Even today, there’s no museum and there’s practically no information about fascism in school textbooks. The Portuguese people paid a high price for the loss of 48 years of freedom. People were murdered and imprisoned, so if the younger people feel that freedom just dropped from the sky, then they’re wrong.”

He hopes Peniche will remind people that freedoms can be lost as well as won. “This is the danger: freedom is not guaranteed,” he says. “This museum is here to remind us. This fortress is one of the last remaining symbols of fascism. These walls are a museum in themselves.”