The United States has agreed to hand over to France the last three French detainees at the U.S. naval base at Guantanamo Bay (search), Cuba, judicial officials said Tuesday.

The agreement was finalized just as Secretary of State Condoleezza Rice (search) was to arrive in Paris for a meeting with President Jacques Chirac (search), the officials said on condition of anonymity.

Her visit is part of American and French efforts to repair ties strained over Iraq. While historic allies, France and the United States also have been at odds over the best way to fight terrorism.

The date of the handover of Mustaq Ali Patel, Ridouane Khalid and Khaled Ben Mustafa has not been finalized, but their return is expected soon, the officials said.

"Things are headed in the right direction, and we are now discussing the details," said William Bourdon, an attorney for Ali Patel, who has both French and Indian nationality.

All three were expected to go before judges, and they could be held pending investigation under the preliminary charge of "criminal association with a terrorist enterprise" — a charge often used in such cases in France.

Khalid's brothers, Djamel and Zinedine, are being investigated in France on suspicion of involvement in the robbery of more than $1.28 million to finance terrorism. Zinedine is also being investigated in a separate inquiry into suspected Chechen terrorism.

But judicial officials said Patel's case could present problems because he does not appear to have links with Islamic militants and was thought to have been in the Pakistan-Afghan region for business reasons when he was detained.

Four other French citizens once held at Guantanamo were returned to France in late July. Mourad Benchellali, Imad Kanouni, Nizar Sassi and Brahim Yadel are being held in France as part of an investigation into suspected terror-related networks.

They were captured in the U.S.-led campaign that toppled the hard-line Taliban regime in Afghanistan. Each spent more than two years at Guantanamo, and French authorities had struggled for months to secure their return.

Anti-terrorism judges have placed them under investigation, a step toward formal charges, for "criminal association with a terrorist enterprise."

Investigators suspect they frequented groups that planned terror attacks in Europe. Several confessed to training in military camps where they learned to use explosives and weapons, officials said.

Sassi and Benchellali are also under investigation for using false documents. The two are childhood friends who grew up in a tough suburb outside the southeastern city of Lyon and went to Afghanistan together in June 2001 with stolen passports, officials say. They were arrested in December 2001 and brought to Guantanamo.