Amazon has confirmed it has reached an agreement to buy game livestreaming service Twitch for US$970 million.

The deal is expected to close in the second half of this year.

It had been reported earlier this year that Google-owned YouTube was looking to purchase the service.

"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 – from The International, to breaking the world record for Mario, to gaming conferences like E3. And, amazingly, Twitch is only three years old," said founder and CEO of Amazon.com 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.

Being part of Amazon will allow Twitch to do even more for its community, said Twitch CEO Emmett Shear.

"Amazon and Twitch optimise for our customers first and are both believers in the future of gaming," said Shear.

“This change will mean great things for our community, and will let us bring Twitch to even more people around the world."

In a letter to the Twitch community, Shear thanked its users for shaping the service.

“Together with you, we’ve found new ways of connecting developers and publishers with their fans. We’ve created a whole new kind of career that lets people make a living sharing their love of games. We’ve brought billions of hours of entertainment, laughter, joy and the occasional ragequit. I think we can all call that a pretty good start,” he wrote.

"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.

"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."

Twitch was launched in June 2011 by Justin.tv co-founders Justin Kan and Emmett Shear, and now attracts more than 55 million visitors per month.