SOUTHAVEN, Miss. — President Trump on Tuesday sharply mocked the woman whose allegation of sexual assault has upended his effort to install a second justice on the Supreme Court, escalating a battle that has already polarized Washington and the country.

At a campaign rally, Mr. Trump went further than ever before in directly assailing Christine Blasey Ford, the university professor who accused Judge Brett M. Kavanaugh, his nominee, of pinning her to a bed and trying to take her clothes off at a high school party in the early 1980s.

Playing to the crowd of thousands gathered to cheer him on, the president pretended to be Dr. Blasey testifying before the Senate Judiciary Committee last Thursday. “Thirty-six years ago this happened. I had one beer, right? I had one beer,” said Mr. Trump, channeling his version of Dr. Blasey. His voice dripping with derision, he then imitated her being questioned at the hearing, followed by her responses about what she could not recall about the alleged attack.