Graham Hughes spent his first night out of prison on Monday
A Merseyside film-maker who was jailed in the Cape Verde Islands off the coast of West Africa, has been freed.
Graham Hughes, 30, was arrested on the island of Sao Tiago after arriving aboard a boat from Dakar, Senegal.
He had gone to the island as part of a challenge to visit all of the United Nations' 192 member states in a year.
Mr Hughes's father, also called Graham, told the BBC his son had contacted him on Monday, telling him the judge had dismissed the case against him.
The Foreign and Commonwealth Office confirmed Mr Hughes had been released on Monday.
It is believed the video director, from West Derby, Liverpool, was arrested on suspicion of entering the country illegally on Wednesday after arriving on a fishing boat as part of a challenge for the WaterAid charity.
He was put in prison but was unable to contact his family until Saturday, which prompted their frantic attempts to get information about his situation.
Cape Verde's UK embassy and bureau high commissioner Joao Roberto are based in Liverpool.
Mr Roberto spent the weekend on the phone trying to contact officials, before his release by the judge on Monday, Mr Hughes Senior told BBC Radio Merseyside.
"The first I knew about all this was when I got a phone call from the High Commissioner Joao Roberto and he said to me 'Graham is free' - three magic words to us," said Mr Hughes.
Sao Tiago is the largest of the Cape Verde Islands
"He's happy at the moment but he's engaged his lawyer to act for the fishermen as well."
But despite his six-day ordeal, Mr Hughes said his son would not be giving up on his mission to raise £1m for WaterAid.
"This is the first trouble he's had and he's visited 90 countries already," he added.
Sao Tiago is the largest of the Cape Verde Islands.
Mr Hughes had been raising money for the WaterAid charity by aiming to visit each of the 192 UN member states by public transport within a year.
As part of the challenge he must use public transport and cannot fly, hitchhike or drive.
A spokeswoman for the charity said everyone was "delighted" to hear the news of his release.
"We are very grateful for his efforts through his Odyssey Expedition to raise money to bring safe water and sanitation to some of the world's poorest people and we wish him well," she added.