An Italian woman who was kidnapped in Kenya while volunteering as an aid worker has been freed in Somalia after an 18-month ordeal.

Italian Premier Giuseppe Conte hailed the release of Silvia Romano, who was a 23-year-old volunteer with the Italy-based humanitarian group Africa Milele when she was abducted in the coastal trading centre of Chakama in November 2018.

“Thanks to the men and women of the foreign intelligence services,” Mr Conte tweeted. “Silvia, we’re waiting for you in Italy!”

The head of the Italian parliament’s committee on security, Raffaele Volpi, said Ms Romano appeared in good condition after her rescue about 30 kilometres from the Somali capital, Mogadishu.

“She’s in good shape. Obviously she’s had a rough time from being imprisoned, but she’s OK,” the ANSA news agency quoted Mr Volpi as saying.

Italian news reports said that after her kidnapping, Ms Romano ended up in the hands of militants linked to Somalia’s al-Shabab Islamic extremists.

Al-Shabab has been blamed for a series of kidnappings of foreigners along Kenya’s coast. Kenya said the abductions of four foreigners prompted it to send troops to Somalia in 2011 to fight al-Shabab members.

Ms Romano was seized as gunmen looking for a “mgeni” – Swahili for visitor – fired weapons indiscriminately during an attack in Chakama, according to Ronald Kazungu Ngala, a student whose education was being sponsored by Africa Milele and who witnessed the November 20 kidnapping.

After sharing his account with The Associated Press, Mr Ngala continued seeking information about Ms Romano’s fate. On Saturday, he said he was overjoyed to hear she had been freed.

“I feel so happy. We didn’t know whether they had killed her or done something bad. Living with the uncertainty was painful,” Mr Ngala, 20, said.

Mr Ngala said Kenyan authorities questioned him after the attack and initially thought they had zeroed in on her location but “eventually her trail went silent”.

“When I see her on TV speaking, that’s when I will completely believe because there were many occasions when authorities here suggested she was close to being rescued and then nothing,” he said.

Italian Foreign Minister Luigi Di Maio, who also announced Ms Romano’s liberation on Twitter, said, “The government never leaves anyone behind.”