The extreme heat in Phoenix led to the cancellation of nearly 50 flights on Monday and Tuesday, according to the Arizona Republic. With temperatures soaring to a high of 120 degrees Fahrenheit, American Airlines said it was forced to ground dozens of planes at of Sky Harbor International Airport. Stranded travelers were advised to contact their airlines for rebooking options or to request a refund.

Extreme heat affects a plane’s ability to take off, especially smaller jets like those that service American Airlines’ regional routes. Larger aircraft manufactured by Boeing and Airbus have maximum operating temperatures of 127 degrees. But smaller planes, like the Bombardier CRJ regional aircraft, can only operate at a maximum temperature of 118 degrees.

The science behind these maximum operating temperatures is pretty simple: hot air is less dense than colder air, and the more extreme the temperature, the faster a plane needs to travel in order to achieve lift. Many airports don’t have long enough runways to allow planes to achieve this necessary speed during high heat.

Patrick Smith, a pilot, blogger, and author of Cockpit Confidential, writes that hot air “affects the output of the engines as well as aerodynamic capabilities, increasing the required runway distance and reducing climb performance. Therefore the amount of passengers and cargo a plane can carry are often restricted when temps are very high.”

This isn’t Phoenix’s first brush with extreme heat, nor the first time soaring temperatures have led to flight cancellations. In 2013, US Airways canceled 18 flights after temperatures in Phoenix hit 119 degrees.

It stands to reason that these types of events will become more common as climate change continues to cause the mercury to spike. 2016 was the hottest year on record, marking the third year in a row that the world’s global temperatures have set records. Previously, 2014 was considered the warmest year in recorded history, but it was eventually beat out by 2015.