TORONTO — Embattled Governor General Julie Payette, the representative of Queen Elizabeth II in Canada, resigned Thursday amid reports that a third-party probe into allegations of workplace harassment and bullying from current and former staffers had been completed.

Media reports cited unnamed sources who described the investigation’s findings as so “scathing” and “blistering” that it would have been virtually impossible for the former astronaut to stay in the largely ceremonial role she has occupied since 2017.

In a statement, Payette, 57, apologized for “tensions” that she said had arisen “over the past few months” at Rideau Hall, the official residence of the governor general, but not explicitly for the allegations that prompted the review.

“I am a strong believer in the principles of natural justice, due process and the rule of law, and that these principles apply to all equally,” she said. “Notwithstanding, in respect for the integrity of my viceregal Office and for the good of our country … I have come to the conclusion that a new governor general should be appointed.”

The report has not been made public. Payette noted that no “formal complaints” or “official grievances” were made during her tenure.

“We all experience things differently,” she said, “but we should always strive to do better, and be attentive to one another’s perceptions.”

Prime Minister Justin Trudeau accepted Payette’s resignation.

“Every employee in the government of Canada has the right to work in a safe and healthy environment, and we will always take this very seriously,” he said in a statement. “Today’s announcement provides an opportunity for new leadership at Rideau Hall to address the workplace concerns raised by employees during the review.

Trudeau said Richard Wagner, the chief justice of Canada, would perform the duties of the governor general until he recommends a successor.

The Privy Council Office, a public service department that supports the government and cabinet, ordered the investigation last year after the Canadian Broadcasting Corp. reported that Payette led a workplace that was a “house of horrors,” replete with harassment and bullying.

The CBC enumerated allegations from more than a dozen anonymous current and former staffers. They included claims that Payette verbally abused staffers, reduced them to tears, dismissed their work harshly in an effort to humiliate them and was prone to disquieting outbursts.

Turnover was high. The CBC said Payette would quiz her employees on the planets in the solar system to provoke a “gotcha moment.” Assunta di Lorenzo, Payette’s secretary and longtime friend, also resigned.

Governors general are appointed by the queen, often to five-year terms, on the advice of the Canadian prime minister, although the queen is unlikely in practice to gripe about a prime minister’s selection. Prime ministers may not fire them. To oust a controversial governor general, a prime minister would have to ask Buckingham Palace to remove the person.

Analysts said they believe this is the first time a governor general in Canada has resigned while bogged down in controversy.

The governor general serves as commander in chief of Canada; represents the country at home and abroad; reads the Speech from the Throne, which outlines the government’s agenda for a new session of Parliament; and grants royal assent to bills so that they become law.

The governor general also decides whether to approve a prime minister’s request to dissolve Parliament, which triggers a new election, or to suspend Parliament. That means he or she can play a key role in a constitutional crisis.

Dominic LeBlanc, the minister of intergovernmental affairs, said in an interview on CTV News that Trudeau and Payette had discussed the report before her resignation.

Trudeau announced Payette’s appointment in 2017, describing her at the time as a “truly exceptional Canadian” who would serve as a “trailblazer and an inspiration for all of us.”

A former chief astronaut of the Canadian Space Agency, she flew on two space shuttle missions and was the first Canadian to board the International Space Station. An engineer by training, with degrees from the University of Toronto and McGill University, the Montreal native speaks a half-dozen languages and has performed in the choir of the Montreal Symphony Orchestra.

But her tenure as governor general was turbulent, provoking difficult questions for Trudeau about whether he and his office had exercised due diligence in vetting her for the job.

Media reports painted a portrait of a private woman who chafed at tradition and being in the public eye. She clashed with her security team and tried to slip away. She long refused to move into the official residence in Ottawa, even after several hundred thousand dollars were spent on renovations.

When the allegations of workplace harassment emerged, Trudeau came to Payette’s defense, lauding her as an “excellent” governor general.

When the suggestion emerged last year that Prince Harry, who had stepped back from his role as a senior royal and relocated to North America, could become the next governor general, the prime minister’s office requested “holding lines” from the Department of Canadian Heritage.

“They have asked for lines expressing confidence in the current GG,” a staffer in the Heritage Department’s media relations office wrote to colleagues in the Privy Council Office, according to emails obtained by The Washington Post through a public records request. “We are definitely not in a position to comment on this.”

The request for the lines was later dropped, a subsequent email indicated.

On Thursday afternoon, Payette hosted a recorded conversation on Facebook with Maj.-Gen. Dany Fortin, the military officer in charge of the national vaccine rollout, and Gary Kobinger, a Canadian microbiologist.

She ended the conversation by saying that she would be back next week to delve into another pressing issue: What effect “months and months of confinement and distancing and teleworking and isolation in many cases has on the well-being of people.”