Spanish state broadcaster RTVE has won national broadcasting rights for the 2014 winter and 2016 summer Games, the International Olympic Committee said on Friday.
The deal is worth just over 70 million euros ($100 million), according to an IOC source.
Spain is one of six European countries where rights are being directly negotiated by the IOC. For the other nations, the 2014/16 rights have been sold to SportFive sports agency, owned by France's Lagardere media group.
The IOC reached rights agreements in Turkey and Italy last year but deals have yet to be signed in Germany, Britain and France.
RTVE has acquired the rights across all broadcast platforms, including free-to-air television, subscription television, radio, the internet and mobile phones.
We are delighted to be continuing our relationship with RTVE, who have done a fantastic job for many years promoting the magic of the Olympic Games across Spain and helping to promote Olympic sports, IOC President Jacques Rogge said in a statement.
The winter games will be held in Sochi, Russia, while the IOC will award the 2016 summer games during its congress in Denmark next month.
The IOC says Olympic broadcasts must reach the broadest possible audience across all these platforms, including guaranteed free-to-air television coverage.
The IOC late last year severed ties with the European Broadcasting Union (EBU) after more than 50 years, rejecting its umbrella bid for the two-Games package and opting instead to negotiate individual deals for better terms.