The cast of The West Wing reunited and brought an episode of the acclaimed political drama to the stage in a bid to encourage people to vote.

Martin Sheen reprised his role as President Jed Bartlet and was joined by his former co-stars including Bradley Whitford, Rob Lowe, Richard Schiff and Allison Janney.

This Is Us actor Sterling K Brown replaced the late John Spencer as White House chief of staff Leo McGarry.

The cast re-enacted the Hartsfield’s Landing episode from season three. It features Sheen playing chess with his staff members while involving in a much larger battle of brains with China.

Elsewhere, Whitford’s deputy chief of staff Josh fixates over the portentous primary election outcome in a tiny New England town.

West Wing creator Aaron Sorkin described the episode as “kind of an ode to voting”. The special was filmed at the historic Orpheum Theatre in downtown Los Angeles and was in aid of the When We All Vote organisation, which was founded by Michelle Obama.

The former first lady made an appearance during the show, which is available on the HBO streaming service, urging people to go to the polls.

She was joined by former president Bill Clinton.

Whitford opened the programme with an address to viewers. He acknowledged some would not “fully appreciate the benefit of unsolicited advice from actors,” but “at a time like this, the risk of appearing obnoxious is too small a reason to stay quiet if we can get even one new voter to vote”.

The West Wing ran from 1999 to 2006 and was hugely successful, winning 26 Primetime Emmys, among other accolades.

Some critics dismissed it for its portrayal of conservatives while others called it “The Left Wing”.

Election day in the US is November 3.