Jennifer Garner made a sly joke about her ex-husband Ben Affleck in the new action comedy Deadpool & Wolverine.

Garner, 52, and Affleck, 51, got married in 2005 and welcomed three children – Violet, 18, Fin, 15, and Samuel, 12 – before separating in 2015.

They famously enjoy such an amicable co-parenting relationship that they were trailed by reunion rumors for years until they finalized their divorce in 2018.

Affleck then returned to his early aughts flame Jennifer Lopez and married her in 2022, but the pair are currently thought to be on the verge of splitting up.

Now Garner, in spite of her friendly equation with Affleck, has taken a cheeky jab at him in her latest high-profile movie role.

Jennifer Garner made a sly joke about her ex-husband Ben Affleck in the new action comedy Deadpool & Wolverine; pictured at the Vanity Fair Oscar Party in 2014

Jennifer Garner made a sly joke about her ex-husband Ben Affleck in the new action comedy Deadpool & Wolverine; pictured at the Vanity Fair Oscar Party in 2014

Deadpool & Wolverine sees Garner return to the role of Elektra – which she first played in the 2003 film Daredevil opposite Affleck.

In Deadpool & Wolverine, Elektra remarks offhand that Daredevil has been killed, and when she is offered condolences, she shrugs and drily replies: ‘It’s fine.’

Elektra and Daredevil were love interests in the 2003 Daredevil movie, and Garner later reprised the role in a 2005 spin-off called Elektra.

Deadpool & Wolverine unites two heavyweights of the superhero genre – Ryan Reynolds, who plays Deadpool, and Hugh Jackman, who plays Wolverine.

Jackman in particular has been beloved by comic book fans as their big-screen Wolverine ever since he first portrayed the character in the 2000 film X-Men.

The new movie bowed this Friday and was warmly received by the critics to the tune of an 80% rating on the review aggregate Rotten Tomatoes.

Audiences gave the film a 97% on the website, and the film is reportedly projected to have a domestic debut between $160-170, per Deadline.

If it achieves that goal, Deadpool & Wolverine will have the biggest opening of any R-rated film in history – a milestone previously hit by the first Deadpool in 2016.

Garner, 52, and Affleck, 51, got married in 2005 and welcomed three children - Violet, 18, Fin, 15, and Samuel, 12 - before splitting in 2015; pictured 2007

Garner, 52, and Affleck, 51, got married in 2005 and welcomed three children – Violet, 18, Fin, 15, and Samuel, 12 – before splitting in 2015; pictured 2007

Deadpool & Wolverine sees Garner return to the role of Elektra - which she first played in the 2003 film Daredevil opposite Affleck (left)

Deadpool & Wolverine sees Garner return to the role of Elektra – which she first played in the 2003 film Daredevil opposite Affleck (left)

Elektra and Daredevil were love interests in the 2003 Daredevil movie, and Garner later reprised the role in a 2005 spin-off called Elektra (pictured)

Elektra and Daredevil were love interests in the 2003 Daredevil movie, and Garner later reprised the role in a 2005 spin-off called Elektra (pictured)

Deadpool & Wolverine unites two heavyweights of the superhero genre - Ryan Reynolds, who plays Deadpool, and Hugh Jackman, who plays Wolverine

Deadpool & Wolverine unites two heavyweights of the superhero genre – Ryan Reynolds, who plays Deadpool, and Hugh Jackman, who plays Wolverine

Affleck then reunited with his early aughts flame Jennifer Lopez and married her in 2022, but the pair are now widely thought to be on the brink of splitting up; pictured last year

Affleck then reunited with his early aughts flame Jennifer Lopez and married her in 2022, but the pair are now widely thought to be on the brink of splitting up; pictured last year

Garner and Affleck separated in 2015 amid an explosion of reports that he had an affair with the family’s nanny Christine Ouzounian.

However Garner later clarified: ‘Let me just tell you something. We had been separated for months before I ever heard about the nanny,’ via Vanity Fair.

They retained a famously tight close-parenting bond and were frequently spotted together taking their children to church in Los Angeles.

When Affleck relapsed into alcoholism in 2018, Garner reportedly staged an intervention, armed with a sober coach and a Bible.

She was then seen driving him to rehab, handing him a takeout bag of Jack-In-The-Box as he sat appearing bleary and red-faced in the backseat.

In the past few months she has reportedly emerged as an ‘unexpected ally’ to Lopez as the latter attempts to save her troubled marriage to Affleck.

‘She’s been helpful to JLo, and they’ve been relating to each other. Jennifer has been a surprising person for JLo to talk to,’ a source informed Us Weekly.