Flight Compensation Regulation of the European Union, Regulation (EC) No 261/2004, establishing common rules on compensation and assistance to passengers in the event of denied boarding and of cancellation or long delay of flights.

Flight Compensation Regulation (Wikipedia)

Official text