People in Peru have been able to message friends and family even while a flood ravaged the country -- thanks to internet balloons.

Project Loon, part of Google parent company Alphabet, can now bring basic internet to people in disaster zones. The company successfully connected tens of thousands of people in Peru for the last seven weeks, where flooding has destroyed homes and roads.

Project Loon is a part of X, Alphabet's "Moonshot Factory." Giant balloons float high in the stratosphere and beam internet connectivity down to Earth. The project launched in 2013 (at the time with Google branding), but the Peru efforts are the first time the company provided internet for so many people.

Project Loon had been testing in Peru with telecom company Telefonica for months. So when flooding and mudslides ravaged Peru this spring, the infrastructure was already in place to provide emergency internet for those affected. The company announced its successful Peru efforts on Wednesday.

Related: Facebook wants to beam the internet down from helicopters

The balloons, which are still in place, provide internet to people in flood zones around Lima, Chimbote, and Piura. At least 72 people died in the mudslides and flooding.

According to Alphabet (GOOGL), the balloons provided 160GB of data to tens of thousands of users, or enough data to send and receive 30 million WhatsApp messages, or two million emails.

Project Loon puts Alphabet one step ahead of Facebook (FB) in bringing internet to underserved parts of the world. In April, Facebook announced it built a prototype helicopter antenna that could provide internet to areas during disasters. It had not yet been tested in real life scenarios.

Both firms ultimately want to be internet providers for remote areas, even when there isn't a disaster. By bringing more people onto the internet, it gives them opportunities to connect with family, education and jobs. And, crucially, it gives them more access to Google and Facebook services.