Cynthia Nixon and Kim Cattrall mourn co-star Willie Garson

Cynthia Nixon and Kim Cattrall have paid tribute to their Sex and the City co-star Willie Garson, who has passed away at the age of 57.

Garson, who was best known for playing Stanford Blatch, the best friend of Sarah Jessica Parker's Carrie Bradshaw, in the TV show, passed away on Tuesday afternoon following a battle with cancer.

Responding to the news, Nixon shared a throwback photo of her and Garson on Twitter and Instagram and wrote, "So deeply, deeply sad we have lost @Willie.Garson. We all loved him and adored working with him. He was endlessly funny on-screen and in real life. He was a source of light, friendship and show business lore. He was a consummate professional- always. My heart goes out to his son, @Nathen_Garson. Nathen, I hope you know how much he loved you and how proud he was to be your dad."

Cattrall shared a still of Stanford with her character Samantha Jones and tweeted, "Such sad news and a terribly sad loss to the SATC family. Our condolences and RIP dear Willie xo."

Mario Cantone, who played Stanford's husband Anthony Marentino, also shared a tribute, writing, "I couldn't have had a more brilliant TV partner. I'm devastated and just overwhelmed with Sadness. Taken away from all of us way soon. You were a gift from the gods. Rest my sweet friend. I love you."

Stars including Ben Stiller and Matt Bomer also posted tributes to Garson on social media.

The actor appeared in both Sex and the City films and had filmed scenes for the upcoming revival series, And Just Like That..., before he died. He also appeared in TV shows such as White Collar, Hawaii Five-0, NYPD Blue, and Supergirl and films including There’s Something About Mary, Fever Pitch, Groundhog Day, and Being John Malkovich.