Apple has come forward to help China in fighting its worst flood in years, according to USA Today. The China Foundation for Poverty Alleviation (CFPA) said on Monday that it has received a $1 million (7 million yuan) donation from the Cupertino-based giant. The CFPA is a Chinese non-governmental organization working to assist flood victims.

Apple logo

First U.S. company to offer help

Since the end of June, southern China has been besieged by heavy rainfalls and floods. According to statistics from the nation’s Ministry of Civil Affairs, the disaster has affected 31 million people in more than 500 cities and towns by Friday. In addition, 73,000 buildings have collapsed, 164 people have been killed and 26 are still missing. Further, nearly 2 million people have been moved to safer places. According to the Ministry of Civil Affairs, more than 1 million people are in need of emergency assistance.

On the Chinese social networking site Weibo, Apple Chief Executive Tim Cook wrote, “Our thoughts are with all those devastated by the flooding along the Yangtze River.”

The Chinese NGO said on its website that the iPhone maker is the first company from the U.S. that has donated to it in this year’s flood. The organization adds that it will work closely with the iPhone maker to make sure the money is applied in the best manner.

Not the first time for Apple helping China

Apple’s humanitarian help for the second-largest market and most-populated nation in the world comes at a time when it itself is struggling with its performance. The iPhone maker reported a profit of $10.52 billion, down by 22.5%, for the quarter ended in March. Also revenues declined 12.8% to $50.56 billion, its first decline in quarterly revenue since 2003. In addition, sales of Apple products fell 26% compared to a year ago in the Greater China region.

It should be noted that this is not the first time that the smartphone maker has donated to China after a natural disaster. According to the U.S. Chamber of Commerce Foundation, Apple donated about $8 million (50 million yuan) to victims in the 2008 Wenchuan earthquake in China’s Sichuan region. Also in 2014, the iPhone maker contributed $1.6 million in financial aid after a devastating earthquake hit China’s Yunnan province. It also donates a portion of App Store and retail sales to the (RED) Foundation on events like World AIDS Day.

On Monday, Apple shares closed up 0.31% at $96.98. Year to date, the stock is down almost 10%.