An eagle on the 11th carried first-round co-leader Lima back to front of the pack but Fasth climbed back to the top of the leaderboard with him after a closing birdie at Eichenried, where a strong wind affected scoring.
Lima, battling back from back problems, said he had tried to stay calm about missing fairways and putts in the windy conditions on a course made more difficult by thicker rough this year.
Lima, born in Versailles where his father worked at St Nom la Breteche golf course, shrugged off his bad holes to contend strongly again.
After falling back with a double-bogey on the eighth, he vaulted ahead of the field with a raking 45-foot putt on 11.
"I stuck to the same gameplan I've had all week and thought calmly," Lima told Reuters. "If I missed some shots or putts I tried to forget it and get on with it."
While Lima is trying to add to his 2004 St Omer Open success, Fasth is looking for his sixth tournament victory, the week after finishing fourth in the US Open.
Fasth began confidently enough and increased his overnight lead to three shots but wavered with four bogeys on the front nine to allow Lima to take over.
Even then the Swede nearly edged ahead on the last, where his eagle putt just failed to drop.
Fasth waved aside a suggestion that he might have been feeling the effects of his US Open efforts.
"I might well have felt more energetic if I'd had a week off but I've cut back on practice and made a little bit of a compromise this week and I'm still strong," he told reporters.
Argentina's Ricardo Gonzalez finished three shots off the lead. The European Tour triple winner boosted his round of 69 with an eagle two on the 16th, driving the 300-yard green and holing a 12-foot putt.
Bernhard Langer's bid to claim the only German title he has not won looked good when he raced six under for the day by the 13th but the 49-year-old German dropped two strokes in the last three holes for a 68 which left him five shots off the lead.