Andy Murray will meet Novak Djokovic in the group stages of the Barclays ATP World Tour Finals after the draw was made in London.
As No 3 seed, the US Open champion was guaranteed to face either Djokovic or Roger Federer in the round robin stages of the season-ending tournament, which begins at the O2 on Monday.
As well as Djokovic, Murray will also face fifth seed Tomas Berdych and seventh seed Jo-Wilfried Tsonga in what looks significantly the tougher of the two groups.
In line: Novak Djokovic (left) will meet Great Britain's Andy Murray (centre) in the group stages of the ATP World Tour Finals in London
Ferrer is in Group B with defending champion Federer, who will lose his world number one ranking to Djokovic on Monday, sixth seed Juan Martin Del Potro and eighth seed Janko Tipsarevic.
The draw guarantees at least one meeting between Murray and Djokovic, continuing a rivalry that has quickly developed into the sport's most compelling of the moment.
Warming up: Murray and coach Ivan Lendl in London
As well as the US Open final, where Murray won his first grand slam title in a dramatic five-set match, the pair also met in the final of the Shanghai Masters last month.
On that occasion, Murray held five match points but it was Djokovic who eventually came out on top, and the Scot will hope to end an unwelcome habit of losing matches he was one point away from winning.
His third-round defeat to Jerzy Janowicz of Poland at the Paris Masters last week made it three successive defeats since the US Open in which he has held match points.
All smiles: Djokovic (centre right) was with Murray (left) at the official launch of the tournament on Saturday
Clash of the titans: Djokovic and Murray have served up some classics of late
Murray will be looking to end his season on a high with a first title at the World Tour Finals, a tournament Federer has won a record six times.
In four previous appearances, Murray has twice reached the semi-finals, most recently in 2010, when he lost an epic three-setter to Nadal.
The tournament is being held at the O2 for the fourth time after moving from Shanghai on a five-year contract in 2009, and organisers are expecting record attendances.
There is a prize pot of more than £1million available for an undefeated champion and 1,500 ranking points.