James Bond has a new boss — Jeff Bezos.

Amazon just closed on the deal to purchase MGM Studios, the legendary Hollywood studio that is home to the 007 film franchise, the Rocky and Creed films, as well as hit tv shows like “The Handmaid’s Tale” and “Fargo,” for $8.45 billion.

It’s the second-biggest acquisition in company history, behind only its $13.7 billion purchase of Whole Foods. Adding MGM’s massive library of film and television properties, which includes more than 4,000 films and 17,000 TV shows, is seen as a treasure trove of intellectual property for Amazon Studios, its film and TV division.

“It’s very exciting and provides so many opportunities for high-quality storytelling,” according to Mike Hopkins, senior vice president of Prime Video and Amazon Studios.

In the entertainment world, Amazon buying MGM is seen as a way to help it keep pace in the hyper-competitive streaming media market. With Disney+ and Netflix as the two biggest players in the field, other companies have been spending big and striking rich deals to be able to compete. Discovery’s $43 billion merger with WarnerMedia is a prime example of such a move. Amazon has the finances to stay in the game, but by adding MGM’s vast library of content, it potentially has material that will enable it to keep growing its Prime membership base, which stands now at over 200 million. Last year, Amazon spent $11 billion on video content, part of what CEO Jeff Bezos calls the company’s “flywheel effect,” in that the video content lures more Prime subscribers, who in turn spend more money on the site. 

One of the most iconic studios in Hollywood, MGM was founded back in 1924. Over the years, the studio produced some of the most beloved and acclaimed motion pictures in history, from 1939’s “The Wizard of Oz” and “Gone With the Wind” to Oscar-winning classics such as 1960’s “The Apartment” and 1961’s “West Side Story.”

Over the years, it has been bought and sold numerous times, because its back catalog of classic films remains valuable. MGM also has full ownership of the premium cable network Epix. Amazon’s deal to buy the studio still must clear regulatory approval.