Tori Spelling and Dean McDermott's break-up announcement came "out of the blue".

Tori Spelling and Dean McDermott have been married since 2006

Tori Spelling and Dean McDermott have been married since 2006

The 50-year-old star and Dean, 56, have been through plenty of ups and downs in their marriage - but Dean's recent break-up announcement caught their friends by surprise.

A source told PEOPLE: "Their friends have seen their ups and downs through the years, but they really did seem to be in a good place in recent months. This feels really out of the blue."

Tori and Dean have actually been getting along better in recent times.

The insider added: "If this had happened a year ago, it would’ve been expected because things were terrible between them. Sure, they still had their disagreements and didn’t always see eye to eye, but the past six months things had felt good between them."

Tori and Dean's relationship has felt "way less toxic" in recent months.

A second source said: "They were definitely trying in the last few months though, and things felt way less toxic. They also made an effort to make holidays and milestones special, and were much more in tune with each other. It’s been a night-and-day difference from the last couple years."

Dean announced their break-up in a now-deleted Instagram message.

The actor wrote on the photo-sharing platform: "It’s with great sadness and a very very heavy heart that after 18 years together and 5 amazing children, that @torispelling and I have decided to go our separate ways, and start a new journey of our own.

"We will continue to work together as loving parents and guide and love our children through this difficult time. We ask that you all respect our privacy as we take this time to surround our family with love and work our way through this. Thank you all for your support and kindness. [prayer emoji] (sic)"