In the process the American, whose Tour de France for Garmin-Transitions had ended prematurely following a crash last month, became the first person to defend his title since the race's inception in 1996.
As the 216.6km race entered its final stages in heavy rain the breakaway groups were swallowed up by the peloton and made a sprint finish inevitable.
German Christian Knees of the Milram team and AG2R's Martin Elmiger attacked late but once again the peloton reeled them back in with only a couple of kilometres remaining.
Edvard Boasson Hagen looked to have been given the perfect platform for his sprint to the line by his Team Sky colleagues, but Farrar nipped in front to win the title by the smallest of margins.
HTC-Columbia's André Greipel, who had been in confident mood ahead of the race, had to settle for third place in front of his home crowd.
- Related links