WASHINGTON — President Trump revealed early Friday morning that he and the first lady, Melania Trump, had tested positive for the coronavirus, throwing the nation’s leadership into uncertainty and escalating the crisis posed by a pandemic that has already killed more than 207,000 Americans and devastated the economy.
Mr. Trump, who for months has played down the seriousness of the virus and hours earlier on Thursday night told an audience that “the end of the pandemic is in sight,” will quarantine in the White House for an unspecified period of time, forcing him to withdraw at least temporarily from the campaign trail only 32 days before the election on Nov. 3.
The dramatic disclosure came in a Twitter message just before 1 a.m. after a suspenseful evening following reports that Mr. Trump’s close adviser Hope Hicks had tested positive.
In her own tweet about 30 minutes later, Mrs. Trump wrote that the first couple were “feeling good,” but the White House did not say whether they were experiencing symptoms. The president’s physician said he could carry out his duties “without disruption” from the Executive Mansion.
Mr. Trump’s positive test result posed immediate challenges for the future of his campaign against former Vice President Joseph R. Biden Jr., the Democratic nominee, with barely a month until Election Day.
Even if Mr. Trump, 74, remains asymptomatic, he will lose much of his remaining time on the campaign trail. If he becomes sick, it could raise questions about whether he should remain on the ballot at all.
The White House did not say how long Mr. Trump would have to remain isolated, but it canceled his plans to fly to Florida for a campaign rally on Friday, stripping his public schedule for the day of everything except a midday telephone call “on Covid-19 support to vulnerable seniors.”
Appearances at rallies in Wisconsin on Saturday and in Arizona on Monday also appear sure to be scrapped, and the next debate, scheduled for Oct. 15 in Miami, was left up in the air.
During late-night conversations, aides to Mr. Trump were discussing whether he should give an address to the nation on Friday from the White House or find some other way for him to reassure the public.
But the aides were still in a state of shock as they absorbed the news, and there was no immediate word on how far the infection may have spread among senior White House officials, who generally do not wear masks in deference to the president’s disdain for them.
“The president and first lady are both well at this time, and they plan to remain at home within the White House during their convalescence,” Dr.
Sean P. Conley, the White House physician, said in a statement, adding: “Rest assured I expect the president to continue carrying out his duties without disruption while recovering, and I will keep you updated on any future developments.”
Other aides to the president would not say whether he was experiencing symptoms, but people at the White House noticed that his voice sounded raspy on Thursday, although it was not clear that was abnormal for him, especially given the number of campaign rallies he has been holding lately.
Even if Mr. Trump does not become seriously ill, the positive test could prove devastating to his political fortunes given his months of playing down the enormity of the pandemic even as the virus was still ravaging the country and killing about 1,000 Americans every day.
He has repeatedly predicted the virus was “going to disappear,” asserted that it was under control and insisted that the country was “rounding the corner” to the end of the crisis. He has scorned the advice of scientists, saying they were mistaken about the severity of the situation.
For months, Mr. Trump has refused to wear a mask in public on all but a few occasions and has repeatedly questioned their effectiveness. And as recently as Tuesday, at their opening debate, he mocked Mr. Biden for wearing one. “I don’t wear masks like him,” the president said, his voice dripping with derision. “Every time you see him, he’s got a mask.”
It was not immediately clear whether Mr. Trump might have been infected by the virus at the time of the debate with Mr. Biden, 77, although the two stood far across stage and never got within six feet of each other.
Trailing in the polls, the president in recent weeks has increasingly held crowded campaign events in defiance of public health guidelines and sometimes state and local governments. When he accepted the nomination on the final day of the Republican National Convention, he invited more than 1,000 supporters to the South Lawn of the White House and has held a number rallies around the country since, often with hundreds and even thousands of people jammed into tight spaces, many if not most without masks.