OTTAWA -- A man accused of holding Amanda Lindhout hostage in Somalia testified in court he did not receive ransom money -- even though he twice told undercover RCMP officers he got US$10,000.

Ali Omar Ader told Ontario Superior Court on Tuesday that he lied in 2013 about being paid to a Mountie posing as his business agent because it was what the man wanted to hear.

At the time, Ader believed he was meeting the businessman on the island of Mauritius to discuss plans to publish his book about Somalia.

The seeds of the phoney book project were planted three years earlier when Ader tried to make contact with Lindhout's mother, months after her daughter was freed. The undercover Mountie phoned Ader in Somalia, saying he had been hired by the shaken family to respond to all queries.

They stayed in touch about Ader's book, leading to the face-to-face meeting in Mauritius. The Mounties saw the elaborate scheme as a way to get Ader to admit involvement in the hostage-taking.

Ader told the court Tuesday he feared his business associate would not trust him if he denied responsibility for the kidnapping.

Ader said he repeated the lie about getting $10,000 US two years later in Ottawa -- this time with his supposed agent and a second Mountie posing as a Vancouver publisher -- because he wanted to make his dream of being an author a reality.

"To tell you the truth, I did not receive any money," Ader said under questioning from Samir Adam, one of his lawyers.

Lindhout and Australian photographer Nigel Brennan were abducted by armed men while working on a story near Mogadishu in August 2008, the beginning of 15 months in captivity. Both were released upon payment of a ransom.

Ader, a 40-year-old Somalian national who speaks some English, has pleaded not guilty to a criminal charge of hostage-taking for his alleged role as a negotiator and translator.

In a secretly recorded sting video of the 2015 Ottawa meeting, Ader acknowledges being paid for helping the shadowy group of armed kidnappers.

In the witness box, however, Ader has told a different story.

He has painted himself as a victim who was coerced into assisting three gang leaders and a posse of gun-toting youths over several months through threats, a beating and an attack on his family.

He said he was detained by the group and forced to make ransom calls to Lindhout's mother. Ader described escaping at one point, and later surrendering to the kidnappers after they assaulted his family and threatened to do worse.

In fact, Ader said, he then moved his wife and children into a house with the kidnappers as it was the only option at the time.

Ader insisted he tried to tell his supposed business agent in Mauritius that he had no choice but to work with the hostage-takers, but the man wasn't interested. "He did not listen to me -- he did not pay attention to me."

Ader said since his associate kept closing down the conversation, he told him what he liked hearing.

He said he felt compelled to repeat the lie about being paid to help the gang to secure the book deal at the meeting in Ottawa.

In cross-examining Ader, prosecutor Croft Michaelson challenged this latest version of events, saying his testimony was "largely untruthful."

Michaelson wondered why Ader would make up a story in Mauritius for a man he had come to see as a trusted business partner, instead of telling him he was forced to co-operate with a gang of kidnappers.

"Why wouldn't you have told him the story you have told us today?" Michaelson asked.

"Wouldn't it have made more sense to tell him the truth than to manufacture a lie?"

Michaelson also quizzed Ader about moving his family into a house with the hostage-takers.

"Why would you bring your wife and children with you to live with gunmen?"

Ader replied: "It was part of the surrender."