NEW YORK — Union Rags picked up right where I'll Have Another left off, coming from behind to catch a Bob Baffert-trained horse at the finish in a Triple Crown race.

In Saturday's Belmont Stakes, it was another photo finish decided by a neck. Just like the Preakness.

The 3-year-old bay colt barreled through a slim opening on the rail to edge Paynter, dealing Baffert, jockey Mike Smith and owner Ahmed Zayat a third loss in this year's Triple Crown series.

"We needed every bit of the mile and a half," winning trainer Michael Matz said.

I'll Have Another won the Kentucky Derby and Preakness with stirring stretch drives over Baffert's Bodemeister. But the champion stunned the racing world Friday when he was scratched from the Belmont and retired due to a tendon injury, relinquishing a shot at the first Triple Crown sweep since 1978 and only the 12th ever.

His absence opened up the race for Union Rags, who finished a troubled seventh in the Derby after a bumpy start.

Union Rags skipped the Preakness and because of the Derby problems switched jockeys for the Belmont – from Julien Leparoux to John Velazquez, who picked up his second Belmont victory; he won in 2007 with filly Rags to Riches.

"I have to give it to the horse. He did it all for me. He just worked so unbelievable and I was just hoping he could put that work into today's race and he did," said Velazquez, who will enter racing's Hall of Fame in August. "I was very proud of him.'"

A crowd of 85,811, cheered as Paynter and Union Rags furiously battled down the stretch, with Union Rags barely catching the front-runner in the second straight photo finish to decide a Triple Crown race this year.

"Is there a Triple Crown for seconds?" Baffert said. "I really felt like I was going to win the Belmont. It was snatched away again."

Zayat was just as bummed, calling it "a heartbreaking defeat."

"He ran his guts out," he said, referring to Paynter, who was making just his fourth career start. "I'm very disappointed we opened the rail for (Union Rags)."

Jockey Mike Smith took the blame.

"I'm an old veteran, you know," he said. "They're not supposed to get through on the fence on me, and he did. I dropped the ball. My fault."

Union Rags was along the inside in the middle of the pack until it was time to make a move for the lead, and that's when Velazquez guided him to the inside of the front-running Paynter. Turning for home, Union Rags was full of run, but needed an opening. Velazquez had no room to swing outside, so he focused on finding a hole along the rail. Suddenly, a sliver appeared when Paynter slid over just enough to let Union Rags through in the final sixteenth of a mile. And then it was a charge to the finish line.

They raced head-to-head, with both jockeys furiously whipping their horses in the shadow of the wire. Union Rags stuck a neck in front at the end and gave fans a thrilling finish that was certainly reminiscent of the sidelined I'll Have Another.

"He jumped right in there and before I could do anything about it, it was too late to stop him," said Smith, the 46-year-old Hall of Famer who was aboard Bodemeister in the two earlier defeats. "I certainly didn't want to let the stewards decide the outcome of the race."

The win also signaled a change of fortune for Union Rags. At the Kentucky Derby, where he was the second choice in betting, he was knocked around by Dullahan coming out of the starting gate and was trapped on the inside, leading Matz to make the jockey change.

In the Florida Derby, he got stuck in traffic and broke free too late, ending up third. As the even-money favorite in last year's Breeders' Cup Juvenile, Union Rags got forced wide for most of the race before closing the gap while running erratically and losing by a head.

"We always thought this horse had Triple Crown potential," Matz said. "He had trouble in his second race and his third race. I do really think that this horse, when he has a clean trip and can show himself, is one of the best 3-year-olds in this crop. Whether he could have done something against I'll Have Another, I don't know, but it sure would have been fun to see."

Union Rags, the 5-2 second choice, ran the 1 1/2 miles in 2:30.42. The colt owned by Phyllis Wyeth returned $7.50, $4.20 and $3.40. Paynter, who sat out the Derby and Preakness, paid $5.10 and $3.90. Atigun was another 1 3/4 lengths back in third and paid $10.60 to show. He also skipped the first two legs of the Triple Crown.

"It was my dream and he made it come true," said Wyeth, wheelchair-bound as the result of a 1962 car accident in which she broke her neck. "Nobody would have gotten through on the rail other than Johnny. That was unbelievable. He just said, `Move over, I'm coming.' He believed in the horse and Michael got him there."

Street Life was fourth, followed by Five Sixteen, Unstoppable U, Dullahan, My Adonis, Ravelo's Boy and Optimizer. Guyana Star Dweej trailed badly and was eased in the stretch by jockey Kent Desormeaux.

Dullahan was the slight favorite by virtue of the more than $200,000 bet on him to win.

Before the race, I'll Have Another, with jockey Mario Gutierrez aboard, walked into the winner's circle for a tribute to the newly retired champion. Trainer Doug O'Neill removed the chestnut colt's saddle for the last time as his barn staff hugged each other and the crowd cheered in a poignant salute.

"I wish I can be unsaddling him in the winner's circle after a win," O'Neill said. "He was a once in a lifetime, heroic horse."

Loading Slideshow...
  • Union Rags Wins Belmont

    Eventual winner Union Rags, third from right, and the rest of the field leave the starting gate during the Belmont Stakes horse race at Belmont Park in Elmont, N.Y., Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    A general view of the start of the 144th running of the Belmont Stakes at Belmont Park on June 9, 2012 in Elmont, New York.

  • Union Rags Wins Belmont

    A general view of the start of the 144th running of the Belmont Stakes at Belmont Park on June 9, 2012 in Elmont, New York.

  • Union Rags Wins Belmont

    A general view of the start of the 144th running of the Belmont Stakes at Belmont Park on June 9, 2012 in Elmont, New York.

  • Union Rags Wins Belmont

  • Union Rags Wins Belmont

    Union Rags with jockey John Velazquez up, right, holds off Paynter with jockey Mike Smith to win the 144th Belmont Stakes horse race at Belmont Park in Elmont, N.Y., on Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    John Velazquez, Union Rags, Paynter, Mike Smith

  • Union Rags Wins Belmont

    Jockey John Velazquez eases up on Union Rags, right, after victory over Paynter, left, with jockey Mike Smith, in the Belmont Stakes horse race in Elmont, N.Y., Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    Jockey John Velazquez pours water over Union Rags after the horse came from behind to capture the Belmont Stakes at Belmont Park in Elmont, N.Y., Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    Union Rags, inside, with jockey John Velazquez, defeats Paynter, with Mike Smith, in the Belmont Stakes horse race in Elmont, N.Y., Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    Jockey John Velasquez pumps his fist as he rides Union Rags into the winner's circle after the Belmont Stakes horse race, Saturday, June 9, 2012, at Belmont Park in Elmont, N.Y.

  • Union Rags Wins Belmont

    Union Rags, right, with jockey John Velazquez, eases ahead of Paynter, with Mike Smith riding, to win the Belmont Stakes horse race in Elmont, N.Y., Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    Jockey John Velazquez rides Union Rags, right, to victory over Paynter, with jockey Mike Smith, in the Belmont Stakes horse race in Elmont, N.Y., Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    Jockey John Velazquez rides Union Rags, right, to victory over Paynter, with jockey Mike Smith, in the Belmont Stakes horse race in Elmont, N.Y., Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    Jockey John Velazquez smiles aboard Union Rags after their win in the Belmont Stakes horse race at Belmont Park in Elmont, N.Y., on Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    Michael Matz, John Velazquez, Union Rags

  • Union Rags Wins Belmont

    Groom Incencio Diaz, left, and stable foreman Benjamin Perez, right, lead I'll Have Another into the winner's circle at Belmont Park in Elmont, N.Y., Saturday, June 9, 2012, for his retirement ceremony.

  • Union Rags Wins Belmont

    Jockey John Velasquez, left, and Union Rags owner Phyllis Wyeth, right, hold the winner's trophy after Union Rags won the Belmont Stakes horse race, Saturday, June 9, 2012, at Belmont Park in Elmont, N.Y.

  • Union Rags Wins Belmont

    Jockey Mario Gutierrez, left, and trainer Doug O'Neill, right, talk as they walk to the winner's circle ahead of I'll Have Another for the horse's retirement party at Belmont Park in Elmont, N.Y., Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    I'll Have Another (11) is walked through the paddock past a statue of 1973 Triple Crown winner Secretariat prior to his retirement ceremony and the running of the Belmont Stakes horse race on Saturday, June 9, 2012, at Belmont Park in Elmont, N.Y.

  • Union Rags Wins Belmont

    Howard Berman, of Yonkers, N.Y., wears his I'll Have Another T-shirt before the Belmont Stakes horse race at Belmont Park in Elmont, N.Y., Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    Julia Hanson, 8, of Chicago, looks at a statue of 1973 Triple Crown winner Secretariat prior to the Belmont Stakes horse race, Saturday, June 9, 2012, at Belmont Park in Elmont, N.Y.

  • Union Rags Wins Belmont

    Retired jockey Ron Turcotte, left, who rode Secretariat to the Triple Crown in 1973, poses for photos with Kenny Foudy, 5, next to a statue of the race horse prior to the Belmont Stakes, Saturday, June 9, 2012, at Belmont Park in Elmont, N.Y.

  • Union Rags Wins Belmont

    Jami Jordan, left, of Carlisle, Pa., and Tonia Cooke, of Oakdale, N.Y., pose for photos by a statue of 1973 Triple Crown winner Secretariat prior to the Belmont Stakes horse race, Saturday, June 9, 2012, at Belmont Park in Elmont, N.Y.

  • Union Rags Wins Belmont

    Todd Martin of Canton, Mich., stands behind a banner he draped at Belmont Park in Elmont, N.Y., on Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    Race fans watch horses in the paddock before the fourth race at Belmont Park race track in Elmont, N.Y., Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    A poster for I'll Have Another lies on the ground after a retirement ceremony for the horse before the Belmont Stakes horse race at Belmont Park in Elmont, N.Y., on Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    I'll Have Another tee shirts hang in a merchandise tent at Belmont Park in Elmont, N.Y., on Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    Sepctators watch the fourth race at Belmont Park in Elmont, N.Y. on Saturday, June 9, 2012 before the 144th Belmont Stakes horse race in the afternoon.

  • Union Rags Wins Belmont

    Vic Anderson of Middletown, Conn., wears an I'll Have Another pin at Belmont Park in Elmont, N.Y., on Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    Chef Bobby Flay sits in a box in the clubhouse at Belmont Park in Elmont, N.Y., on Saturday, June 9, 2012. The 144th Belmont Stakes horse race is this afternoon.

  • Union Rags Wins Belmont

    Desiree Dyess of Natchitoches, Louisiana, has her picture taken in front of a mural of Belmont Park race track at Belmont Park in Elmont, N.Y., on Saturday, June 9, 2012.

  • Union Rags Wins Belmont

    ELMONT, NY - JUNE 09: Horses stand with Police officers up before the start of the 144th running of the Belmont Stakes at Belmont Park on June 9, 2012 in Elmont, New York.

  • Union Rags Wins Belmont

    New York Racing Association's Karl Bajenting hands out posters of I'll Have Another to fans at Belmont Park in Elmont, N.Y., on Saturday, June 9, 2012. I'll Have Another's bid for a Triple Crown ended with the shocking news that the colt was out of the Belmont Stakes due to a swollen left front tendon.