US porn star Stormy Daniels has made a surprise appearance on US TV show Saturday Night Live as her legal wrangle with President Trump over an alleged affair continues.

Playing herself in the latest in the show's series of sketches lampooning the president, she mocked him, saying: "I know you don't believe in climate change but a storm's a coming baby."

Ms Daniels was paid $130,000 by Mr Trump's lawyer in 2016 to keep quiet.

Mr Trump denies the affair.

However he has said he reimbursed his lawyer Michael Cohen for the $130,000 payment, which he says was designed to stop Ms Daniels from making "false and extortionist" statements.

The Saturday Night Live sketch featured actors Alec Baldwin as Mr Trump and Ben Stiller as Mr Cohen.

In it, Baldwin playing Mr Trump instructs his lawyer to "call up Stormy Daniels and fix this once and for all" and keep him on the line to listen in.

Ms Daniels herself answers the phone to loud whoops from the audience.

Stiller calls Ms Daniels and asks if she's alone, with Baldwin as Mr Trump then interrupting with: "And what are you wearing?"

Baldwin as Mr Trump then takes over the call and tells Ms Daniels everyone knows the alleged affair is "just an act".

"I work in adult films, we're not really known for our acting," Ms Daniels replies.

"What do you need for this all to just go away," asks Baldwin, to which Ms Daniels says: "A resignation."

"I solved North and South Korea, why can't I solve us?" asks Baldwin.

Ms Daniels says: "Sorry Donald, it's too late for that. I know you don't believe in climate change but a storm's a coming baby."

Earlier in the sketch, Stiller as Mr Cohen refers to contradictions in statements last week by Mr Trump and his new lawyer Rudy Giuliani about the legal case involving Ms Daniels.

Stiller appeals to Mr Trump and his new lawyer Rudy Giuliani, saying: "Guys can we please just decide on one lie and stick to it because our stories are all over the place."

Mr Trump on Friday said his new lawyer had made a mistake because he was new to the job and would "get his facts straight" before adding that he was "not changing any stories" with regard to Ms Daniels.

Mr Giuliani later released a statement intended to "clarify" his remarks.

The Saturday Night Live sketch also featured actors Scarlett Johansson as Ivanka Trump and Jimmy Fallon as Jared Kushner.