Jennifer Garner was spotted Wednesday for the first time after ex-husband Ben Affleck married Jennifer Lopez on Sunday.

Garner was seen in Los Angeles on the set of her new show, “The Last Thing He Told Me,” with a big smile. The actress sported a causal look and wore green cargo pants, a white T-shirt and white sneakers.

Garner and Affleck were married 10 years before announcing their separation in 2015. Their divorce was finalized in 2018. The couple share three children: Violet, 16, Seraphina, 13, and Samuel, 10.

Jennifer Garner

Jennifer Garner on set in Los Angeles after ex-husband Ben Affleck married Jennifer Lopez Sunday. (Snorlax/Mega)

Garner reportedly found out about the Las Vegas nuptials Friday and was in Lake Tahoe while her ex was walking down the aisle.

“Ben did tell Jen about the wedding, but I’m told that it was only Friday at the earliest,” a source told The Post.

“It was very, very minimally planned in advance and was largely spur of the moment. Violet stayed home because she’s extremely loyal to her mom.”

Meanwhile, another insider told Entertainment Tonight that Garner and Lopez’s ex, Marc Anthony, have nothing but well wishes for the happy couple.

“Marc Anthony and Jen and Ben and Jen Garner all still get along relatively well and share special places in each other’s hearts,” the source said. “There is no ill will from anyone, and the mutual goal and focus is zero drama and to prioritize being great parents to their children.”

The source added that both Affleck and Lopez’s kids “are feeling more united as a family since the Vegas wedding, and they are all super excited to see what the future holds for all of them. They all get along really well.”

Jennifer Garner, Ben Affleck

Garner and Affleck were married 10 years before announcing their separation in 2015. (Getty Images)

“Jen and Ben’s Vegas wedding was totally planned, but also privately,” the insider shared. “They wanted it to be a moment they shared together and with their kids and fulfill a fun idea that they shared. To them, it was perfect and a dream come true.”

After Garner and Affleck’s divorce was finalized, a source close to the “Peppermint” actress told Fox News Digital she couldn’t be happier.

“Jennifer is relieved her divorce is finalized and is really looking forward to closing that chapter of her life,” a source said in 2018. “She’ll always be there for Ben and will continue to support him through his ongoing fight in his quest for sobriety.”

Garner remained a huge support branch for Affleck and even staged an intervention for the “Justice League” actor before he checked into a rehabilitation facility in August 2018.

Jennifer Lopez Ben Affleck wedding

Jennifer Lopez and Affleck married in Las Vegas Sunday. (Jennifer Lopez/ OntheJLo.com)

Affleck and Lopez announced their marriage via newsletter on the “Jenny from The Block” singer’s website Sunday afternoon.

“We did it. Love is beautiful. Love is kind. And it turns out love is patient. Twenty years patient.”

Their last-minute nuptials were a surprise to many as they said “I do” with Lopez’s child, Emme, and Affleck’s youngest daughter, Seraphina, in attendance, an eyewitness shared on Good Morning America.

The newlyweds now have five children. Lopez has 14-year-old twins Max and Emme with ex-husband Marc Anthony, and Affleck shares his three kids with Garner.

Bennifer reunites in Italy

Affleck and Lopez were first engaged in 2002 but eventually called off their relationship in January 2004. (Stephane Cardinale)

Affleck and Lopez were first engaged in 2002 and had plans to marry in September 2003 but postponed the wedding and eventually called off their relationship by January 2004.

They rekindled their romance in April 2021 and announced their engagement earlier this year after he proposed while she was in a bathtub.