The ex-wife and ex-girlfriend of publishing scion James Fairchild exchanged a frosty moment when they ran into each other at an otherwise hot Hamptons gala Saturday night.

Spies report that Whitney St. John — who’s locked in an epic divorce battle with Fairchild that’s included skirmishes over possessions like $300,000 in gems — was waiting for her car outside the Parrish Art Museum’s Midsummer Party in Water Mill when Dr. Christine Borelli Grout appeared behind her.

Grout and Fairchild broke up in May and are headed for court in their own equally nasty split, which includes an accusation by Fairchild that Grout took a $250,000 check from him and a restraining order that she filed against him.

“Whitney turned and stared daggers at Christine,” said a witness, adding that Grout then told a pal they should “walk to get their car” and she headed down the street as Whitney gunned her engine and took off.

But Grout was then seen returning to the valet and going back inside the fund-raiser, where guests included designers Randy Kemper and Tony Ingrao, Lisa Perry, Ramona and Mario Singer and jewelry designer Lisa Jackson.

The museum and its director Terrie Sultan honored Inga Maren Otto and Katharina Otto-Bernstein. Perhaps luckily for himself, Fairchild didn’t attend the event but stayed home with his kids.

The restraining order against him specifies he cannot consume alcohol around Grout after a May 6 “domestic incident.”

But Fairchild and Grout are due in court on Thursday over the matter, and sources say he’ll fight to have the order removed.