Twitch is getting bought, but it's not YouTube and Google that are doing the buying. Amazon has agreed to buy the massively popular video game streaming website in an all-cash deal totaling approximately $970 million. The announcement is surprising in light of recent reports that suggested YouTube and Twitch had already reached a $1 billion buyout agreement to bring Twitch's platform and massive community under the Google umbrella.

But ultimately it was Amazon that Twitch bet its future on. "We chose Amazon because they believe in our community, they share our values and long-term vision, and they want to help us get there faster," Twitch CEO Emmett Shear said in a statement. "We’re keeping most everything the same: our office, our employees, our brand, and most importantly our independence. But with Amazon’s support we’ll have the resources to bring you an even better Twitch."

Read more: Why it makes sense for Amazon to Buy Twitch

"Broadcasting and watching gameplay is a global phenomenon and Twitch has built a platform that brings together tens of millions of people who watch billions of minutes of games each month," said Amazon CEO Jeff Bezos. "Like Twitch, we obsess over customers and like to think differently, and we look forward to learning from them and helping them move even faster to build new services for the gaming community." Both companies expect the acquisition to be finalized in the second half of this year.

News that Amazon and Twitch were in late talks about a deal was first reported by The Information. A source familiar with those discussions later confirmed to The Verge that Amazon and Twitch were in the last stages of putting together a deal before it was officially announced Monday.

Jeff Bezos realizes video game broadcasting is a 'phenomenon'

Before today's curve, a pairing between YouTube and Twitch made a lot of sense. Many gamers upload highlights, impressive level playthroughs, and other content to YouTube. But there's no mistaking the fact that the game-streaming revolution is happening at Twitch. With over 55 million monthly visitors, the site has become so popular that it's faced challenges trying to scale for its ever-growing audience. YouTube's vast infrastructure was seen as a logical answer to that problem when reports about an acquisition first surfaced in May. But the Journal reports that those talks ultimately fell apart, making room for Jeff Bezos' company to step in with its own offer.

At first glance, Amazon seems like a less ideal fit. Infrastructure isn't at all a problem; Amazon's AWS and cloud computing services can provide Twitch anything it needs and then some in terms of resources and reliability. But from a culture perspective, the link isn't as obvious. Amazon has long shown a keen interest in gaming — first by encouraging developers to publish games for its Kindle Fire hardware and more recently the Fire TV. A Twitch app for Amazon's set-top box launched in May. Amazon has also committed to building great titles of its own through Amazon Game Studios. But taking ownership of Twitch and its loyal audience is Amazon's most direct statement yet that it's serious about establishing a name for itself in video games.

Being scooped up by Amazon doesn't mean Twitch will lose its identity, and it sounds like that was an important factor in Twitch's decision to move forward with the deal. Comixology, another recent Amazon purchase, is still largely the same aside from some business decisions that've proven unpopular with iOS users. Scaling up is Twitch's primary goal, and Amazon has pretty deep pockets to help out on that front.

Update 4:06PM EST: The article has been updated to reflect announcements from Twitch and Amazon regarding the acquisition and to include the official cost of $970 million in cash.