WASHINGTON — Alaska Airlines slipped past rival Hawaiian Airlines to post the best on-time rating for U.S. carriers in July.

A total of 21 planes were stuck on the ground longer than federal rules allow — three hours for domestic flights, four for international ones.

Eight of the long delays were on Delta or Delta Connection and five were on United.

It was the highest monthly number of long delays in more than a year — since there were 24 in February 2015 — and it could mean fines for the airlines involved.

The Department of Transportation said Tuesday that 75.2 percent of flights on the 12 largest U.S. airlines were on-time during July. That’s down from 78 percent in June and 78.1 percent the previous July.

Chart of airlines' on-time rates in July 2016

The department said 89.4 percent of Alaska flights arrived within 14 minute of schedule, while only 63.3 percent of flights on low-fare Frontier were on time.

The biggest four airlines finished in the middle of the pack, with Delta best in the group followed by United, Southwest and American.

Nearly 2 percent of all flights were canceled, including 2,300 on Southwest in the days after a computer outage. The cancellation rate nearly doubled from June.

Consumer complaints filed with the government continued to fall and represented a tiny fraction of the millions of airline passengers.

The transportation department said it received 1,963 complaints including 1,357 about U.S. airlines. The overall complaint rate fell 9 percent, complaints against U.S. airlines dropped 20 percent, and complaints about foreign airlines rose 19 percent compared with a year earlier.