Nigel Brennan had been in Somalia for a week when he was kidnapped
Two foreign journalists kidnapped in Somalia by militants in August 2008 have been freed by their captors.
Canadian Amanda Lindhout and Australian Nigel Brennan are reported to be in a hotel in the capital, Mogadishu.
Ms Lindhout told Canadian media that the kidnappers had tortured her and that a ransom had been paid for the pair's release.
Somalia has been without an effective government since 1991, and journalists and aid workers are frequently seized.
Ms Lindhout told Canada's CTV that the pair had been taken by gunmen and held in a variety of houses during their 15-month captivity.
She was forced to make calls to media outlets throughout her ordeal, as her captives wanted a ransom to be paid quickly.
"There were times that I was beaten, that I was tortured," she said.
A man purporting to be one of the kidnappers told AFP news agency that the ransom of $1m (£600,000) had been paid.
Somali MP Ahmed Diiriye gave very few details about how the release was secured but said the hostages had been handed over by militiamen.
The pair are due to fly to Kenya on Thursday.
The freelance journalists had been working for Western media organisations when they were captured.
Photojournalist Mr Brennan had only been in the country for a week when the kidnapping happened.
He told Reuters the pair feared they would be sold to other militants and had been kept apart from each other.
He said both had been "through a pretty rough time".
"Being pistol-whipped is sort of torture, being completely stripped of everything and then locked in a room, no-one to speak to, is a form of torture really."
Somali journalist and interpreter Abdifatah Mohammed Elmi, and their two Somali drivers were also seized at the same time, but they were released in January.
They were taken following a trip to visit displaced people outside Mogadishu.
Earlier this year British journalist Colin Freeman and Spanish photographer Jose Cendon were released after being held by Somali kidnappers for 40 days.