An American Airlines aircraft taxis past the terminal at Miami International Airport.

American Airlines accidentally flew the wrong plane from Los Angeles to Hawaii in late August, violating Federal Aviation Administration regulations that require long flights over water to have special certification.

The mistake happened when American Airlines flew an Airbus A321s to Hawaii, an airline spokesman confirmed to BuzzFeed News on Sunday. The incident occurred on Aug. 31 and was first reported by aviation reporter Brian Sumers on Friday.

"The flight departed and landed safely without incident," American Airlines spokesman Casey Norton told BuzzFeed News. "When we realized what happened, we immediately called the FAA and notified them."

Flights over large bodies of water that have no suitable alternative landing locations are required by the FAA to have a certification called ETOPS (Extended-range Twin-engine Operational Performance Standards), but American Airlines' flight in August did not.

Planes are required under ETOPS to have extra medical oxygen, in case a passenger has an unexpected medical emergency during the flight. The certification also requires planes to be equipped with an extra fire suppression system in the bottom of the aircraft, while all flights are required to have at least one extinguisher.

The mistake happened just two weeks after American Airlines started flying A321h planes from Los Angeles to Hawaii — the airline had previously flown other planes on this route.

Norton said that since the accident happened that the airlines has "updated our software to make sure we have the right flight operating on the right route."

Michelle Broder Van Dyke is a reporter and night editor for BuzzFeed News and is based in Hawaii.