ISTANBUL (Reuters) - Turkish authorities have arrested a Frenchman suspected of helping plan a New Year's Day shooting in an Istanbul nightclub which killed 39 people, the state-run Anadolu news agency said on Tuesday.

The man, a 22-year-old French citizen of Turkish descent, was caught in Istanbul, Anadolu said. A police official said he had been detained weeks ago and formally charged last week. His detention had not previously been made public.

Islamic State claimed the nightclub attack and said it was revenge for Turkish intervention in Syria. A court on Saturday remanded in custody Uzbek national Abdulgadir Masharipov, who is accused of carrying out the shooting.

The private Dogan news agency said the French suspect had lived in France since 2009, but it was not clear when he came to Turkey.

He was caught carrying the rental contract of the Istanbul house where Masharipov was staying when he was captured on Jan. 16, Dogan said. It said authorities had been seeking the Frenchman over alleged links to Islamic State.

NATO member Turkey is part of the U.S.-led coalition against Islamic State and launched an incursion into Syria in August to drive the jihadist group and Kurdish militia fighters away from its borders.

Islamic State has been blamed for at least half a dozen attacks on civilian targets in Turkey over the past 18 months, including a triple suicide bombing and gun attack on Istanbul's main airport last June, which killed 42 people.

Authorities on Tuesday prepared an indictment for the airport attack, demanding for the 45 suspects to be sentenced to jail time between 2,132 years and 3,342 years, Anadolu said.

(Reporting by Humeyra Pamuk; Writing by Tuvan Gumrukcu; Editing by Daren Butler, Nick Tattersall and Alison Williams)