JUSTIN TIMBERLAKE and JESSICA BIEL’s wedding plans nearly exploded after she found out JT’s ex-GF CAMERON DIAZ is still in love with him.

The 39-year-old blonde beauty, who dated Justin from 2003 to late 2006 and starred with him in the 2011 movie “Bad Teacher,” admitted in an interview: “Justin and I had a journey together and still do. It changed, but I’m fine with that and so is he. I will always love the man in so many different ways.”

When Jessica heard what Cameron said in the interview, she went ballistic!

“Jessica has always been threatened by Cameron’s close relation­ship with Justin,” said an insider. “And she believed Cameron was saying that if Justin was having second thoughts about the wedding, she would be waiting for him with open arms.”

According to the source, Jessica was so “freaked out” she confronted Justin, 31, in Puerto Rico, where he’s been filming the gambling drama “Runner, Runner” with Ben Affleck.

“Jessica was deeply concerned that Justin could be getting cold feet about marriage,” the insider divulged. “She basically told him that if he didn’t cut contact with Cameron, he could forget about marrying her.”

Justin – who proposed to “New Year’s Eve” star Jessica in December after five years of dating – quickly agreed to the ultimatum.

“The wedding is on and imminent,” the insider added. “But Cameron’s interview really threw Jessica for a loop. It has her questioning Justin’s trust and commitment right down to the wire.”