A little more than two days before she reported testing positive for the coronavirus, first lady Melania Trump — as well as the president’s sons, daughters and several guests — violated safety protocols at the first presidential debate by taking off their masks after being seated in a live studio audience in Cleveland.

Several in the president’s entourage continued without masks after an official from the Cleveland Clinic, which co-hosted the debate, offered them masks in case they didn’t have any, according to debate moderator Chris Wallace. “They waved them away,” Wallace said on Fox News on Friday morning.

It was a violation of rules that both campaigns agreed to, Frank Fahrenkopf, head of the Commission on Presidential Debates, said in an interview with The Washington Post.

“The first family came in wearing masks, but they took them off. The rules said you had to wear a mask,” Fahrenkopf said. “Everyone in that hall was supposed to keep the mask on, other than the president, Biden and Chris Wallace.”

In a statement, the Cleveland Clinic, the health adviser to the debate commission, confirmed that some unidentified members of the audience did not follow the rules during the 90-minute debate.

“Individuals entering the debate hall were masked and in some cases removed their masks once seated,” the statement said. “A Cleveland Clinic physician did offer audience members masks, but some did not adhere to the requirement.”

The confluence of the two major party candidates, their staffs and guests — all indoors in the same room for an extended period of time — has put a spotlight on the president’s disregard for virus precautions two days before he, his wife and close aide Hope Hicks would test positive. All three attended the debate.

Former vice president Joe Biden and his wife underwent testing Friday morning and reported the tests were negative. The Cleveland Clinic said Friday that it believes the risk for transmission at the event was low, but the clinic has begun reaching out to all attendees to offer testing.

Democrats on Friday raised questions about the coronavirus safety protocols around the debate and even whether the debate should have been allowed to begin while audience members openly flouted safety protocols. Some said future debates, if they go on, will need even stricter guidelines and enforcement.

On Tuesday, there were essentially two sets of protocols for debate attendees — one for campaigns and their guests, and one for everyone else.

University officials, journalists and others in the roughly 80-member audience were required to arrive early and submit to nasal swab testing before the debate.

A Post reporter credentialed for the debate arrived Monday, submitted to a test and was told to return to her hotel and await results. Within four hours, she and other reporters were notified by email or text. They were then fitted with bracelets showing they were negative, which granted them access to a press building blocks away from the debate venue.

By contrast, campaigns were responsible for testing candidates and their guests, the Cleveland Clinic confirmed in a statement Friday.

“Individuals traveling with both candidates, including the candidates themselves, had been tested and tested negative by their respective campaigns,” the statement said.

The clinic added that it believes there was “low risk of exposure to our guests” during the debate because of safety protocols, which also included social distancing, hand sanitizing and temperature checks.

The president and his guests at the debate received rapid coronavirus tests on Tuesday, White House officials said. Rapid tests differ from the PCR, or polymerase chain reaction, tests that are considered the gold standard for diagnosis of acute coronavirus infection.

The White House in March began using rapid tests made by Abbott Laboratories. The tests produce results in five to 13 minutes, but in a study earlier this year they missed a third of the positive samples identified by another brand. Some more recent academic studies have said Abbott’s tests miss infections 20 to 30 percent of the time. The company says they perform far more accurately than that when used as intended.

Fahrenkopf said the debate commission was told of no positive tests in advance of the event.

According to White House officials, neither the president, nor Hicks nor other aides wore masks on the trip to Cleveland.

At the debate hall Tuesday, roughly 80 chairs were spaced apart with antibacterial wipes set on each, and signs were posted reminding guests to social distance, according to dispatches filed by Anita Kumar, a Politico reporter who was the designated pool reporter for the White House Correspondents’ Association and was allowed to enter the venue ahead of most guests.

The campaigns had each been allotted 15 tickets, and Kumar found most of those on Trump’s side had chairs reserved by name: first lady Melania Trump, Ivanka Trump, Donald Trump Jr., Eric Trump, Tiffany Trump, Lara Trump, Kimberly Guilfoyle, Rep. Jim Jordan (R-Ohio), White House Chief of Staff Mark Meadows, Phoebe Meadows and Blake Meadows.

Filling in a seat behind Guilfoyle was UFC fighter Colby Covington, and behind Ivanka Trump was Alice Johnson, a criminal justice reform advocate.

By the time Melania Trump entered, minutes before the debate began, all of the Trump guests had taken off their masks.

The Cleveland Clinic health safety official, wearing a white lab coat, soon approached the Trump group, according to Wallace.

The official “offered them masks in case they didn’t have them, and they were waved away,” Wallace, a Fox News anchor, said Friday morning in an interview on the network. “And people in the hall noticed.”

“That actually violated the rules of the Cleveland Clinic,” Wallace said.

Wallace’s account echoed that of NBC reporter Marianna Sotomayor, who tweeted: “I witnessed a Cleveland Clinic doctor remind Trump’s guests to wear a mask, even offering them surgical ones on the off chance they didn’t have one. None of them put on a mask. The doctor looked frustrated as she stepped away, prompting a staffer to say, ‘That’s all you can do.’ ”

In Cleveland, wearing a mask in nonresidential indoor spaces is required under an ordinance that has been in place since July. The event was held inside a pavilion on the Health Education Campus of Case Western Reserve University and Cleveland Clinic.

The Cleveland Clinic is advising the Commission on Presidential Debates about health safety at all of this year’s presidential debates. “Debate precautions will be aligned with county, state and CDC guidelines for health, safety and physical distancing,” it says on its website.

Even before the news that Trump contracted the coronavirus, the Biden campaign had been pressing the Commission on Presidential Debates to change the format of the vice-presidential exchange and require the candidates to stand about 12 feet apart — as Biden and Trump did — rather than be seated about seven feet apart, according to a person familiar with the discussions who spoke on the condition of anonymity.

Biden’s team believes the news about Trump will prompt the commission to agree, said the person, who is not authorized to publicly discuss internal campaign deliberations: “The pressure is on the commission to err on the side of safety right now.”

Rep. Tim Ryan (D-Ohio) was in the debate hall on Tuesday night, and on Friday morning went to get tested for the coronavirus. “I started my morning off with a cup of coffee, Maria Bartiromo, and then a Q-Tip down my nose,” he said. He expressed anger at the Trump family for not wearing masks during the debate, as they were instructed to do. “The rules don’t apply to them,” he said.

Anne Gearan, Annie Linskey and Paulina Villegas contributed to this report.