WASHINGTON — President Trump denied on Thursday knowing of a $130,000 payment his lawyer made to a pornographic film actress who claims to have had a sexual encounter with him, an assertion that threatened to complicate his legal battle against her.

Mr. Trump made his first public remarks about the matter aboard Air Force One as he returned to Washington from White Sulphur Springs, W.Va., where he had held a round table on tax cuts. Asked by a reporter if he knew about the payment to the actress, Stormy Daniels, whose given name is Stephanie Clifford, he said, “No.”

Asked why Michael D. Cohen, his personal lawyer, had made the payment, Mr. Trump said: “You’ll have to ask Michael Cohen. Michael is my attorney, and you’ll have to ask Michael Cohen.”

The president said he did not know where the money had come from, and ignored a question about whether he ever set up a fund Mr. Cohen could draw from.