Former President Donald J. Trump said late Friday that he agreed to debate Vice President Kamala Harris on Sept. 4 in an event moderated by Fox News. If it happens, that would be the second presidential debate this election cycle and the first between Mr. Trump and the new Democratic candidate.

According to Mr. Trump’s post on his social media site, Truth Social, the debate is to take place at a to-be-determined location in Pennsylvania, one of the most consequential battleground states. Fox News anchors Bret Baier and Martha MacCallum would moderate.

It was unclear early Saturday whether Ms. Harris had agreed to the debate and its terms. Representatives of her campaign did not respond to requests for comment. A spokeswoman for Fox News also did not respond to questions.

Mr. Trump said that the Fox News debate would have a live audience; the previous debate between President Biden and Mr. Trump was hosted by CNN in an empty venue. Though both campaigns agreed to the format of the first debate, Mr. Trump had bemoaned the lack of a crowd.

He further added the rules would be similar to the CNN debate, though he did not specify which rules. That debate had included mic cuts to prevent interruption.

Mr. Trump also said that he is “totally prepared to accept” Ms. Harris as the Democrats’ new candidate. Since her campaign suddenly took shape after Mr. Biden dropped out of the race about two weeks ago, Mr. Trump has characterized her ascendancy as a “coup” within the Democratic Party. In his debate announcement, the former president complained about the shake-up.