Joe Tessitore and Matt Bernier discuss American Pharoah's becoming the 12th horse to win the Triple Crown. (1:34)

NEW YORK -- By midstretch, Bob Baffert knew it. American Pharoah was going to win the Triple Crown.

He took his eyes off the horse to soak in the crazed scene of the packed grandstand. Fans jumped up and down, hugged and tossed drinks in the air.

The race wasn't even over yet, and the crowd knew it, too. Thirty-seven years of waiting to see one of the rarest feats in sports was almost over.

"The crowd was just thundering, and I was just enjoying the crowd and the noise and everything happening," the white-haired trainer said. "What a feeling."

Finally, a Triple Crown winner. And 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 in 37 years to sweep the Kentucky Derby, Preakness and Belmont Stakes -- one of the sporting world's rarest feats.

"Wow! Wow!" jockey Victor Espinoza said moments after crossing the finish line. "I can only tell you it just an amazing thing. It's just unbelievable how things work out."

The bay colt with the unusually short tail defeated seven rivals in the grueling 1½-mile race, leading wire-to-wire and covering the distance in 2 minutes, 26.65 seconds to end the longest stretch without a Triple Crown champion in history.

American Pharoah is the 12th horse and first since Affirmed in 1978 to win three races on different tracks at varying distances over a five-week span. He won the Derby by one length May 2, romped to a seven-length victory in the rainy Preakness two weeks later and demolished his rivals Saturday. He is the fourth Triple Crown winner to go wire-to-wire in the Preakness and the Belmont. His time was the second best in the Belmont by a Triple Crown winner, trailing only Secretariat's 2:24 in 1973, and the sixth fastest ever.

"That little horse, he deserved it," said Baffert, who at 62 is the second-oldest trainer of a Triple Crown winner. "He's the one that did it. We were basically just passengers."

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 2002.

Espinoza, the first Hispanic jockey to win the Triple Crown, got it done with his record third shot after failing to win in 2002 and last year on California Chrome.

147th Belmont Stakes Results Runner Win Place Show American Pharoah $3.50 $2.80 $2.50 Frosted $3.50 $2.90 Keen Ice $4.60 $2 Exacta (5-6): $13.60

$2 Trifecta (5-6-7): $109.50

$2 Superfecta (5-6-7-1): $570.00

"I come here with a lot of confidence -- more confidence than anywhere," Espinoza said. "This time, I had so much confidence in American Pharoah.

"That trophy caused me a lot of stress. But the third time is the charm."

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 along the backstretch before falling away on the second turn.

American Pharoah started kicking away heading into the final turn. He opened up on the field as he powered through the 1,097-yard stretch, displaying his fluid, spring-loaded 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.

Frosted finished second and Keen Ice third. Mubtaahij was fourth, followed by Frammento, Madefromlucky, Tale of Verve and Materiality.

"My horse ran great, but the horse everybody expected to win won the race," said Joel Rosario, jockey of Frosted. "It's exciting because we have not seen this for so long and the winner really looked brilliant."

American Pharoah delivered a victory for Egyptian-born owner Ahmed 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 wasn't noticed until the name was already official.

"We need stars," Zayat said. "I'm so thrilled, honored, privileged and humbled."

A sign with American Pharoah's name and silks was quickly put up in the infield next to the 11 other Triple Crown winners. American Pharoah joined the ranks of Sir Barton (1919), Gallant Fox (1930), Omaha (1935), War Admiral (1937), Whirlaway (1941), Count Fleet (1943), Assault (1946), Citation (1948), Secretariat, Seattle Slew (1977) and Affirmed.

"I'm thrilled," said 93-year-old Penny Chenery, who owned Secretariat and watched from the stands.

Convincing Crown Chase American Pharoah's wire-to-wire victory at the Belmont Stakes included a strong final push on the homestretch. He won by 5½ lengths, the fourth-largest margin by a horse completing a Triple Crown bid. Largest Margin of Victory in Belmont Stakes By Triple Crown Winner Year Horse Lengths 1973 Secretariat 31 1943 Count Fleet 25 1948 Citation 8 2015 American Pharoah 5½ 1919 Sir Barton 5 1977 Seattle Slew 4 -- ESPN Stats & Information

The crowd of 90,000 -- capped to avoid overcrowding and long lines from last year's total of 102,199 -- roared as American Pharoah turned for home in front.

As he neared the finish line, drinks were tossed in the air and fans jumped up and down in celebration, many holding their camera phones aloft to capture history on a sunny, 75-degree day at Belmont Park. It's unlikely the champion heard them since American Pharoah wears earplugs to block noise that might get him worked up.

"I feel so good," Espinoza said, "I say, 'I hope American Pharoah feels like me.'"

Afterward, as the tens of thousands of fans left Belmont Park, Nassau County Police said traffic was flowing steadily without delays on the parkways and the Hempstead Turnpike. Track officials also scheduled a postrace concert to encourage people to linger longer and brought in a former FBI official to coordinate security and traffic procedures.

American Pharoah extended his winning streak to seven races. He matched the accomplishment of his grand-sire, Empire Maker, who won the 2003 Belmont, spoiling Funny Cide's Triple Crown bid.

Since 1978, the rigors of the Triple Crown had done in 13 other horses who won the Derby and the Preakness -- with 12 losing the third leg and I'll Have Another scratched with a leg injury in 2012. Their failures left the sport and its fans craving a worthy successor to the 11 previous champions.

American Pharoah -- his tail shortened after being bitten off on the farm as a youngster -- turned out to be that horse.

"I was really getting to dislike this trophy. It's come with a lot of misery," Baffert said of the sterling silver Triple Crown trophy housed for the past 37 years in the Kentucky Derby museum. "But it's owed to the fans of New York that kept paying their money, showing up, hoping. They finally got it."

Unlike Affirmed, who dueled Alydar in all three races, American Pharoah didn't have a specific rival since he was the only horse to run in all three Triple Crown races. Going into the Belmont, American Pharoah had beaten all of his seven challengers before.

Five of his rivals lost to him in the Derby then skipped the Preakness to await the Belmont, a competitive advantage to horses that don't endure the three-race grind. Tale of Verve finished second in the Preakness to American Pharoah, who had beaten Madefromlucky in the Rebel Stakes in March.

American Pharoah became the first horse since Afleet Alex in 2005 to run in all three races and win the Belmont, known as "The Test of the Champion."

He passed, with flying colors.

ESPN Stats & Information and The Associated Press contributed to this report.