NEW YORK — Finally, a Triple Crown winner.

And, after 37 years of waiting, this one was never in doubt.

American Pharoah led all the way to win the Belmont Stakes by 5½ lengths Saturday, becoming the first horse since 1978 to sweep the Kentucky Derby, Preakness and Belmont Stakes — one of sports’ rarest feats.

“Wow! Wow!” jockey Victor Espinoza said moments after crossing the finish line. “I can only tell you it just an amazing thing.”

The bay colt with the unusually short tail easily defeated seven rivals in the grueling 11/2-mile race, covering the distance in 2 minutes, 26.65 seconds — sixth-fastest in Belmont history — to end the longest stretch without a Triple Crown champion in history.

“That little horse, he deserved it,” trainer Bob Baffert said. “He’s the one that did it. We were basically just passengers.”

American Pharoah is the 12th horse and first since Affirmed in 1978 to win the three races on different tracks at varying distances over a five-week span. He won the Derby by one length May 2 and then romped to a seven-length victory in the rainy Preakness two weeks later before demolishing his rivals Saturday.

“I still can’t believe it happened,” said Baffert, at 62 the second-oldest trainer of a Triple Crown winner.

Baffert and Espinoza ended their own frustrating histories in the Triple Crown. Baffert finally won on his record fourth Triple try, having lost in 1997, 1998 (by a nose) and in 2002. Espinoza got it done with his record third shot after failing to win in 2002 and last year on California Chrome.

“I was prepared for somebody coming because I’ve been through this so many times,” Baffert said.

Nobody did.

Espinoza hustled American Pharoah to the lead leaving the No. 5 post and quickly got him over to the rail. Materiality was on his outside in second, but never applied any serious pressure traveling on the backstretch before falling away on the second turn.

American Pharoah started kicking away heading into the stretch turn. He opened up on the field as he powered down the stretch, displaying his fluid, springloaded stride in which he appears to float over the ground.

“It’s just an amazing feeling that you have when you’re 20 yards from the wire,” Espinoza said. “And then at the wire I was like, ‘I cannot believe I did it.’ ”

American Pharoah ran the final quarter-mile — a stretch that has dashed numerous Triple Crown dreams — in 24.32 seconds, faster than Secretariat’s time of 25 seconds in winning the 1973 Belmont.

After making his way back, Espinoza took American Pharoah nearly the length of the sprawling grandstand so the fans could pay their respects to the champion.

As the horses were heading to the starting gate, owner Ahmed Zayat was overflowing with confidence and turned to his wife.

“I told her, ‘Get ready to be the owner of the 12th Triple Crown winner,’ ” he said.

Sent off as the overwhelming 3-5 favorite, American Pharoah paid $3.50, $2.80 and $2.50.

Frosted returned $3.50 and $2.90, while Keen Ice was another two lengths back in third and paid $4.60 to show.

Mubtaahij was fourth, followed by Frammento, Madefromlucky, Tale of Verve and Materiality.

American Pharoah delivered a victory for the Egyptian-born Zayat, who bred the colt and put him up for sale before buying him back for $300,000. His name came courtesy of the family’s online contest, in which a woman from Missouri submitted the winning moniker, but the misspelling — it should be pharaoh — wasn’t noticed until the name was already official.

“I can’t believe it happened,” said Justin Zayat, racing manager for his father’s stable. “It’s amazing. Oh my God.”

American Pharoah — his tail shortened after being bitten off on a farm when he was a youngster — turned out to be the horse that racing fans have been waiting for.

He passed “The Test of Champions” with flying colors.