Didier Francois, a veteran French war correspondent who was held with Foley and released with three other French hostages in April, said the American "was an extraordinary person with a strong character".

He became the whipping boy of the jailers but he remained implacable.

Nicolas Henin, who was held with James Foley

"He was a pleasant companion in detention because he was solid and collective. He never gave in to the pressure and violence of the kidnappers," he said.

Francois, who said he shared a cell with Foley beginning in October, said he had not spoken about Foley until now because the kidnappers had threatened to kill the remaining hostages if he did.

Another released Frenchmen, Nicolas Henin, told France's Express magazine Foley had been treated worse than the other captives, after militants searched his computer and discovered his brother was in the US Air Force.

"Because of that and as he was American, he got extra bad treatment. He became the whipping boy of the jailers but he remained implacable," Henin said.

Who initially seized Foley has been a subject of dispute. Some signs point to the Shabiha, militias loyal to the government of Syrian president Bashar al-Assad.

Phil Balboni, chief executive of GlobalPost, the Boston-based online news publication that employed Foley, said that early on there were strong indications Foley had been transferred to the Syrian capital Damascus. That information later proved incorrect.

He said the first solid information about Foley's condition came nearly a year after his abduction, from a returning European jihadist, or Islamic fighter, who had been with the American journalist in the city of Aleppo.

This person provided confirmation Foley was alive, as well as first-hand details of his captivity and his captors.

Balboni said Foley was moved a number of times and passed through the hands of various captors.

Francois said he had little doubt Foley was under the control of IS or its affiliates the entire time.

"The guy who killed him is the guy who took him from the start," Francois said.

Family received chilling warning about execution

After months of silence from Foley's captors, on the night of August 13 his family received a chilling message: Foley would be executed in retaliation for US air strikes on IS.

The family passed the message on to the US government. Balboni said the Federal Bureau of Investigation, which handles cases involving kidnapped American citizens, helped craft a response, pleading for mercy.

"It was an appeal for mercy. It was a statement that Jim was an innocent journalist" who respected the people of Syria, where he was held, Balboni said.

Foley's family and friends hoped the militants were bluffing and wanted a ransom, he said.

Six days later IS militants stunned America with a gruesome video showing the beheading of Foley by a masked, black-clad man who also threatened to kill a second US journalist, Steven Sotloff.

Foley's death, highlighting how Syria has become perhaps the most dangerous country on earth for journalists, followed intense efforts by GlobalPost and others to identify his captors, and despite brief e-mail exchanges between the militants and his family in late 2013 about a possible ransom.

The Drum: Analysis and opinion

The White House declined to comment on the warning about Foley but it said special operations troops were sent to Syria earlier this year on a secret mission to rescue American hostages, including Foley, but did not find them.

"Since his capture, we have been using every tool at our disposal to try to bring him home to his family and to gather any and all information we could get about his whereabouts, his condition and the threats he faced," White House spokeswoman Caitlin Hayden said.

US president Barack Obama has vowed the US will keep supporting Iraqis in the fight against IS.

Earlier request for ransom gave hope to parents

In November 2013, Foley's family received its first email message from the journalist's captors, demanding a ransom and offering proof he was alive, Balboni said. He did not specify the size of the ransom request.

That exchange did not last long. "Very few" messages were passed, he said.

"They were not loquacious," Balboni said of the captors. "They made their demands."

The communications channel soon went silent and until last Wednesday there were no further messages to the family.

Dying for a story

For many journalists, the price of a story can be their freedom, or even their lives.Almost 40 journalists and media workers have been killed this year alone.They are often the victims of authoritarian governments bent on silencing any opposition, or collateral damage in some of the globe's deadliest conflicts.Using data collected by the Committee to Protect Journalists and Journalists Without Borders, News Online looks at some of the most dangerous places to be a journalist.Click through to see the countries where journalists have been killed and imprisoned since 2000, and look at some of the reporters' stories.

Ukraine

The violent conflict that has gripped Ukraine has made it among the deadliest places to be a journalist in 2014.Four journalists and two media workers have been killed since the start of the year, and there has been a concerted effort by pro-Russian rebels in the east of the country to silence media opposition.At the end of June, the separatists announced that all newspapers and media distributors should seek registration with their 'Ministry of Information', while reportedly banning the terms 'power grab; forced change of DPR's territorial integrity; propaganda of war, violence, national and religious hatred' in media coverage.

Vyacheslav Verimiy (Ukraine)

Vyacheslav Verimiy was a reporter for a Kiev-based daily newspaper who was killed at the peak of the unrest in the city at the start of 2014.Late on the evening of February 18, Verimiy was dragged from a taxi he was taking home from work, allegedly by a group of pro-government protesters, and beaten with baseball bats before being shot in the chest.He died a day later at a Kiev hospital from his injuries.Verimiy had previously been injured covering the protests in Kiev when a stun gun exploded near him.

The Middle East

The instability that has wracked the Middle East for the past decade has made it the most dangerous region in the world to practise journalism.Although the death of acclaimed international reporter Marie Colvin in Syria and the imprisonment of Australian Peter Greste in Egypt have brought home the dangers faced by Western journalists, the vast majority of those killed around the globe are locals, often working for Western media outlets.Those who support journalists working in these countries, such as drivers, fixers, and translators, are also at great risk, and are regularly targeted.Local journalists are also often the victim of kidnappings and imprisonment by both rebel forces and autocratic governments in the region.Iran's tolerance of press freedom is among the worst in the world, ranked 173 out of 180 in Reporters Without Borders' World Press Freedom Index.

Khaled Reyadh Hamad (Gaza)

The renewed violence between Hamas and Israel in July 2014 led to deaths of news agency driver Hamid Shihab and cameraman Khaled Reyadh Hamad, and injury to several reporters whose offices were hit by Israeli strikes. According to the owner of the media company Hamad worked for, he was killed while making a film about the dangers faced by paramedics working in Gaza.He was following an ambulance when the vehicle was hit by an Israeli shell and, along with a Palestinian medic, was killed when a second shell hit.Israel has denied targeting journalists and media organisations, but Al Jazeera evacuated its Gaza office after staff said the building was hit by two Israeli bullets.In response to a question from The Committee to Protect Journalists about recent casualties to media workers in Gaza, IDF spokesman Lt Col Peter Lerner said in a July 22 press conference: "We do not target journalists [...] but journalists do sometimes put themselves in risky positions." He continued, "We have to do our best to facilitate and keep them out of harm's way."

Peter Greste (Egypt)

Australian journalist Peter Greste was sentenced to seven years in jail in Egypt after being found guilty of falsifying news and aiding the now outlawed Muslim Brotherhood. Prosecutors said the relationship between Al Jazeera and the Muslim Brotherhood was like an alliance with the devil, and that Greste's reportage was intended to harm the Egyptian state.The sentencing sparked outrage from media outlets around the world, who see it as an attempt to curtail free speech, and Al Jazeera as collateral damage in the government's efforts to crack down on the Muslim Brotherhood.Greste has described the prosecution's case as hollow, saying throughout the trial there was "no evidence of collusion with anyone. The prosecutor found no false stories; no facts that had been altered; there was no distorted reporting".Greste's brother Michael, who has travelled to Egypt, said the family was prepared to put their faith in the country's system, but had little hope of clemency being granted, believing his brother's case was more a political issue than a judicial one.

Iraq

While journalist deaths in Iraq peaked during the sectarian conflict in 2006, when 51 journalists were killed, it still remains a dangerous place to operate, and the recent resurgence in violence is likely to result in more deaths.Journalists have been deliberately targeted by insurgent groups, as well as killed reporting fighting in the country.Across the border in Syria the toll from that conflict is growing, with 70 journalists killed there in the past two years.

Firas Mohammed Attiyah (Iraq)

Firas Mohammed Attiyah was an Iraqi journalist who worked for the pro-government news organisation Fallujah TV.Attiyah was killed in a roadside bomb attack in the city of Khalidiya while accompanying a government patrol on its way to a ceremony to re-open a local police station.In the lead-up to his death Attiyah had been reporting on clashes between ISIS and government forces in the area.

Syria

The Syrian conflict made this country the most dangerous place to work as a journalist in 2012, and the situation has deteriorated further since. Officially, Syria's constitution guarantees free speech, but reality is different. A 2011 media law bans publication of information about the armed forces, as well as content affecting "national unity" and national security. Reporters have been arrested for threatening national security. Add to that the rise of Islamist groups - including ISIS - that threaten and kidnap journalists, and Syria falls to number 177 on the World Press Freedom Index. According to Reporters Without Borders, nearly 130 news providers were killed in connection with their work from March 2011 to December 2013; seven of these were foreign.

James Foley (Syria)

James Foley was executed in Syria in August 2014, two years after he was kidnapped while working as a freelancer in Syria in 2012.A video showing the beheading of the 40-year-old American journalist was posted online, purporting to be a message to the United States from the terrorist group Islamic State (IS).The video, titled "A message to America", shows Foley on his knees, dressed in an orange jumpsuit, next to a militant clad completely in black with his face covered.Foley's family confirmed his death after the video emerged, saying: "We have never been prouder of our son Jim. He gave his life trying to expose the world to the suffering of the Syrian people."

Turkey

While Turkey has long been touted as a future member of the EU, its treatment of journalists covering anti-government protests that started in 2009 has drawn widespread criticism.Although many of the journalists detained in the aftermath of the protests have been released, 23 remained imprisoned as of June 2014.The imprisonments are set against a backdrop of increasing repression and censorship, including an attempt by authorities to ban access to the social media platform, Twitter.

South Asia

For 2014 World Press Freedom Day, the UN chose to focus on Pakistan - historically the world's deadliest country for media workers. Around the same time, there was an assassination attempt in Karachi on one of the country's best-known TV journalists, Hamid Mir. He survived but was badly wounded. Several weeks before that, gunmen shot a prominent Pakistani commentator who also survived but his driver was killed.In neighbouring India, Reporters Without Borders says criminal organisations, security forces, demonstrators and armed groups all pose a threat to journalists.

Saleem Shahzad (Pakistan)

Saleem Shahzad was an investigative journalist who was killed after writing about alleged links between Al Qaeda and members of Pakistan's Navy.Shahzad went missing on May 29, 2011, and his body was discovered two days later, showing signs of torture.He had told colleagues that he had received death threats from Pakistani intelligence officers in the months before his death, and had sent a note to a friend describing a threat from a top official in case "something happens to me or my family in the future".Shahzad had a long history of reporting on the Taliban in the region, including being held hostage for several days in 2006, and had been due to discuss his story on television the night he disappeared.

East Asia

Closer to home, many of Australia's regional neighbours have long histories of oppression and intimidation of journalists. The Philippines has long fostered a culture of impunity towards crimes on journalists, with over 130 journalists and media workers killed in the country since 1992, mostly for reporting on corruption in politics and business. The 2009 massacre of 30 journalists, as part of an ambush on the families of several prominent political clans, remains the single deadliest event recorded by the Committee to Protect Journalists.China's total control of the press has seen dozens of dissident voices imprisoned or exiled for daring to criticise the ruling party. Its southern neighbour Vietnam also has a poor record when it comes to supporting a free press, with attempts by bloggers to circumvent official news organisations ruthlessly punished.

Dieu Cay (Vietnam)

Nguyen Van Hai, who wrote under the penname Dieu Cay, is a Vietnamese blogger who has been imprisoned since 2008 for writing a blog that exposed government corruption and other politically sensitive issues.During his time in prison he has undertaken at least two hunger strikes to protest against prison conditions, as well as being placed in solitary confinement for refusing to sign a confession for the anti-state offences he has been charged with.His family says his imprisonment has taken a major toll on his health, to the point where he is barely recognisable.

Gerardo Ortega (Philippines)

Talkback radio host Gerry Ortega was shot in the back of the head as he was shopping in a Puerto Princesa City clothing store, shortly after a morning broadcast in 2011.The weapon was traced to a former employee of a provincial governor who Ortega had accused of corruption.Before his death Ortega had faced death threats over his outspoken stance on local government corruption and his opposition to mining projects in the area.

Gao Yu (China)

Gao Yu is a journalist who has a long history of opposition to and imprisonment by the Chinese government.Yu was first arrested after the Tiananmen Square Protests in 1989, and in 1994 was sentenced to six years in prison for publishing "state secrets".In the lead up the 25th anniversary of the protests she was accused of leaking state secrets to foreign media outlets, and imprisoned, in a what was widely seen as a move by China to silence her ahead of the anniversary.