Jen and Ben have been in couple's therapy for years to try and save their marriage Credit: Bauer-Griffin/GC Images

Marriage is hard work. But for Ben Affleck and Jennifer Garner it's been hard work for a long time, a source tells Us Weekly exclusively.

While from the outside the couple might have seemed to be the happy, busy parents of three beautiful children, behind closed doors their relationship had been at a breaking point for ages.

According to the source, the duo had been fighting to keep their family together for a long while, and in fact nearly divorced three years ago. They spent their time since then doing all they could to make things work, including having regular couples therapy.

"They were in couples therapy for years," the source tells Us. "They were going to divorce when Sam was born but you know how it is — baby comes and solves the issues for a bit but it's just a Band-Aid. It hasn't been working for ages," the source continues.

Both Affleck and Garner come from tight-knit family backgrounds and making their relationship work for the sake of the kids was important for them. The pair share three children: daughters Violet, 9, and Seraphina, 6, and son Samuel, 3.

"Ben truly wanted his idea of family life and the idea of family he had growing up in Boston so he stayed in it longer than he wanted to because of the kids and the idea of family," the source adds. "But he couldn't save it."

Affleck alluded to the effort he and his wife were making to keep their marriage together during his acceptance speech for Argo's Best Picture Oscar in 2013.

"I want to thank you for working on our marriage for 10 Christmases. It's good. It is work but the best kind of work and there's no one I'd rather work with," the dad-of-three said while accepting the award. "You have to work harder than you think you possibly can. It's hard. But you can't hold grudges. And it doesn't matter if you get knocked down in life. All that matters is that you gotta get back up."

In the end, the effort was just too much. Affleck, 42, and Garner, 43, announced their plans to divorce after 10 years of marriage on Tuesday, June 30, in a joint statement to Us.

"After much thought and careful consideration, we have made the difficult decision to divorce. We go forward with love and friendship for one another and a commitment to co-parenting our children whose privacy we ask to be respected during this difficult time," the pair said.

Sign up now for the Us Weekly newsletter to get breaking celebrity news, hot pics, and more delivered straight to your inbox!