Former US President Donald Trump is to testify after a court order in a lawsuit in connection with an allegation of rape.

A judge in New York on Wednesday rejected an attempt by Trump to postpone the testimony scheduled for next Wednesday.

This would not place "an undue burden" on the 76-year-old, court documents said.

The case involves a defamation lawsuit brought by author Jean Carroll, who accused Trump of raping her 23 years earlier in 2019.

Trump responded, among other things, with the words: "She's not my type".

He further stated that he had never met her.

She's just trying to sell her new book and has accused other men of similar things.

Carroll accused Trump in the defamation lawsuit of damaging her reputation with his comments.

She had raised the allegation in New York Magazine and later presented it in more detail.

Trump has been repeatedly accused of assaulting women.