Things got wacky on the Manhattan location of the film “Runner, Runner” when JUSTIN TIMBERLAKE challenged co-star BEN AFFLECK to a foot race – after Ben poked fun at Justin’s boasts that he’s a hardcore runner.

Said My On-Set Source: “Ben accepted the challenge – but only on the condition that they’d both run the race in ladies’ HIGH HEELS!

Justin thought Ben was kidding – but when the wardrobe people dug up several pairs of the large-size heels, TimberSnake knew he was in trouble!”

Despite producers begging them to quit before they got hurt, Justin and Ben squeezed into the heels, lined up as giggling co-workers laid down cash bets – then clopped off the starting line at the crack of a starter’s pistol!

It was a totally dirty race: Ben tripped Justin once, and Justin took revenge by shoving Ben into a parked car.

Everyone was in hysterics when the singer, taking pity on the limping actor/director, lifted him up on his back and carried him across the finish line as everyone screamed: “IT’S A TIE!