President Biden tested positive for Covid on Wednesday, forcing him to cancel a campaign event in Las Vegas and likely sidelining him for days following the conclusion of former President Donald J. Trump’s nominating convention on Thursday.

The illness, which the president’s doctor said had produced only mild symptoms so far, was diagnosed even as the Democratic revolt over his candidacy got louder, with more of Mr. Biden’s allies and supporters calling on him to drop out of the race, citing concerns about his ability to defeat Mr. Trump.

Mr. Biden told reporters, “I feel good,” as he boarded Air Force One in Las Vegas to fly back to his beach house in Delaware, where he plans to recuperate. He was not wearing a mask, nor were the people closest to him on the tarmac.

But having Covid is all but certain to complicate the president’s ability to answer his critics, many of whom have said they want him to show that he still has the vigor and energy to prosecute the case against Mr. Trump in campaign rallies, interviews and other events.

If Mr. Biden continues to test positive for the next week or more, it could keep him off the campaign trail. And if he continues to have congestion and a cough, as his doctor reported on Wednesday, it could hamper his ability to perform well in any interviews that his campaign could schedule from his home.

The president and his campaign strategists had hoped to use a two-day visit to Las Vegas to sell his economic and immigration policies to Latino voters in the crucial battleground state of Nevada as he tries to re-energize his campaign after three weeks of instability. In a parallel effort to reach Black voters, on Tuesday he spoke at an N.A.A.C.P. conference and sat for an interview with BET News that was released on Wednesday.