Ben Affleck and Jennifer Garner may be getting a divorce, but they're maintaining a civil relationship.

According to a source close to the situation, the actors will continue to live on the same property.

"It's obviously a very sad time for both of them," the source told ABC News. "They have been trying to save the marriage for years, but they know it's the right thing for their family and for them. The kids will continue to come before everything."

Affleck, 42, and Garner, 43, announced via a spokesperson on Tuesday that they were splitting after 10 years of marriage. They have three children, Violet, 9, Seraphina, 6, and Samuel, 3.

"After much thought and careful consideration, we have made the difficult decision to divorce," they said in a joint statement. "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 couple had long been open about the care that they'd put into their marriage.

At the Oscars in 2013, Affleck thanked Garner for "working on our marriage," and said "there's no one I'd rather work with."

Garner echoed the sentiment last year in an interview with InStyle magazine.

"You can't expect to be courted all the time, and I don't want to court him right now. I don't have the energy!" she said. "But we're definitely in a very mindful place where we're making an effort to be together, do things at the same time, and be loving."