Actress and New York electoral candidate Cynthia Nixon has announced that her oldest child has come out as transgender.

The former Sex And The City star, who played lawyer Miranda Hobbes, posted the announcement on her Instagram account on Friday to mark the 14th annual Trans Day Of Action.

Her 21-year-old son Samuel Joseph Mozes, who goes by the nickname Seph, was originally named Samantha.

A post shared by Cynthia Nixon (@cynthiaenixon) on Jun 22, 2018 at 12:39pm PDT

Seph is the child of Ms Nixon and former partner Danny Mozes. She also has a 15-year-old son with Mr Mozes and a 7-year-old son with her wife, Christine Marinoni.

Cynthia Nixon calls for ICE to be abolished

Ms Nixon accompanied Friday's announcement with a photo of herself with her son in his cap and gown at his graduation earlier this month from the University of Chicago.

The post said: "I'm so proud of my son Samuel Joseph Mozes (called Seph) who graduated college this month. I salute him and everyone else marking today's #TransDayofAction #TDOA"

Ms Nixon is challenging Governor Andrew Cuomo in New York's Democratic primary for governor. She has been a long-time supporter of LGBT rights and is running on a progressive campaign, advocating for the legalisation of marijuana and increased funding for public education.