Tunisian security forces have arrested the nephew of the Berlin market attacker Anis Amri and two other suspects, officials say.

The Tunisian interior ministry said the three, aged between 18 and 27, were members of a “terrorist cell”, and that they were detained overnight.

Tunisian-born Amri, 24, was shot dead by police near the Italian city of Milan in the early hours of Friday.

Monday’s lorry attack on the market left 12 people dead and 49 injured.

The interior ministry statement said Amri’s nephew – the son of his sister – had confessed that he had communicated with his uncle via the encrypted chat application Telegram to evade security surveillance.

It said the three-member cell had been active in the towns of Fouchana, outside Tunis, and Oueslatia near Amri’s hometown of Kairouan, about 150km (95 miles) south of the capital.

The statement added that Amri had sent money to his nephew to travel to Germany and join a jihadist group, and encouraged him to pledge allegiance to the so-called Islamic State (IS) group.

Meanwhile, intelligence services in Spain are investigating a possible internet communication between Amri and a Spanish resident on 19 December, Interior Minister Juan Ignacio Zoido told radio station COPE.

On Friday, IS released a video showing Amri pledging allegiance to its leader Abu-Bakr al-Baghdadi.

Amri was shot dead after opening fire on police officers during a routine police check in the Milan suburb of Sesto San Giovanni, after a three-day Europe-wide manhunt.

In the summer of 2015, a United Nations report said an estimated 5,500 Tunisians – mostly young people between the ages of 18 and 35 – were fighting in the ranks of terrorist organisations in Libya, Iraq, Syria and, to a lesser extent, Mali.

In November this year, the ministry of the interior in Tunis said about 800 fighters had returned to the country.