The deal will help mobile phone operator O2 to win over new customers and retain existing ones, in one of the toughest mobile phone markets in Europe. Analysts expect thousands of customers to walk away from their existing network provider in order to get their hands on the latest technology from Apple.
The phone is expected to be on sale in time for Christmas and has been tipped as one of this year's biggest Christmas gifts.
However, the phone will come with a hefty price tag, expected to be about£300. Operators normally give handsets away free to customers to secure their custom.
The iPhone debuted in the US last week and is thought to have sold 500,000 handsets in its first weekend on sale. AT&T, which has the exclusive rights in the US, said it sold out of the iPhone in most of its 1,800 stores within 24 hours.
The deal will come as a massive blow to Vodafone, which was thought to be the front-runner in negotiations earlier this week.
Bridgewell technology analyst Dan Gardiner said that the implication of the deal was mixed for Carphone Warehouse, but that investors should be relieved that the rights had not gone to Vodafone, which ceased its relationship with Carphone Warehouse last year.
He said: 'This relief may be tempered by the news that Carphone Warehouse will not get the phone initially and speculation is likely to centre on whether it will be able to distribute the phone during the important Christmas period. Consistent with all the mobile operators' strategy of reducing churn by driving customer loyalty, O2 is likely to want to retain a strong direct distribution of the phone.'