The French bank Credit Mutuel is a cooperative bank founded by a mayor in the middle of the 19th century to help poor farmers and craftsmen.
Citigroup, once the biggest bank in the world, has been brought low by vast asset writedowns connected with the subprime securitisation crisis.
Credit Mutuel, which outmanoeuvred the top German bank Deutsche Bank, said: "With this major acquisition, Credit Mutuel... now takes on a significant position in Europe, thus opening up a second domestic market."
Last year, the German Citibank business made a net profit of 365 million euros. The US group will retain its activities for business customers in Germany, investment banking and a research centre in Frankfurt.
The Credit Mutuel group is based mainly in two regions of France, in Brittany in the northwest and Alsace in the northeast, although in the last 10 years it has expanded in the country and in Belgium, Luxembourg and Switzerland.
It is the second-biggest high-street bank in France with 5,148 branches, owns French bank CIC, says it has 14.9 million customers of whom 13.3 million hold personal accounts, and employs 60,000 staff.
And it said it would pay for the Citigroup German operations, operating under the Citibank name, with 4.9 billion euros in cash when the deal was concluded, probably at the end of this year.
Citigroup, restructuring to boost its balance sheet after massive losses arising from the US subprime home-loan crisis, said the deal would yield a net capital gain of about 4.0 billion dollars.
The sale fitted its strategy of re-examining all of the group's activities, it said.
Citigroup reported a net loss of 5.1 billion dollars in the first quarter of this year owing to writedowns of 14 billion dollars. In the last quarter of last year it reported losses of 10 billion dollars owing to writedowns of 18 billion dollars.
The US group has said it wants to dispose of assets, mainly in investment and retail, worth about 400 billion dollars and considered non-strategic to activities in the next two to three years.
The group has also announced plans to shed 16,000 staff.
The Citibank business being acquired has 3.3 million customers, 340 branches and 6,700 employees.
Credit Mutuel said: "With seven percent of the market, it is an essential player in consumer credit in Germany."
Last year Credit Mutuel reported the third-highest profits of any French bank, of 2.73 billion euros, after provisions of 300 million euros for subprime exposure which is low by comparison with the huge sums which many banks have had to write down.