OCEANPORT, N.J. — Maximum Security captured the $1 million Haskell Invitational and, unlike the Kentucky Derby, survived a steward’s inquiry Saturday night.

It capped a long day that included a major delay triggered by intense heat and safety concerns for the horses and riders that led to the cancellation of six races.

When racing resumed around 6 p.m., the six stakes races on the card went off without a hitch until the Haskell.

Maximum Security got to the finish line first, outlasting trainer Bob Baffert’s Mucho Gusto by 1¹/₄ lengths.

For a minute, it seemed a clear-cut win. However, the stewards posted the inquiry sign. Videotape replays showed King for a Day had to check when Maximum Security and Mucho Gusto stormed past.

However, it was quickly dismissed, unlike the Derby when there was a 22-minute delay before Country House was elevated to the top spot and Maximum Security was dropped to 17th place. It was the first time a horse that crossed the finish line first in the Derby was disqualified.