HARRISBURG — State officials have paid at least $3.2 million in taxpayer funds in the last eight years to resolve more than two dozen sexual harassment complaints against government and public employees, according to an analysis by the Inquirer and Daily News and the Pittsburgh Post-Gazette.

Much of the money went to pay settlements and legal fees for complaints filed in courts around the state involving legislators and workers in the executive branch, row offices, the courts, and universities in the State System of Higher Education. The allegations ranged from inappropriate jokes to exposure to pornography and sexual assault. In some cases, employees claimed they were retaliated against for reporting the behavior.

That amount reflects the most complete picture to date of state taxpayer-funded payouts, which are often made quietly and which have become a source of controversy in the Capitol as the #MeToo movement has ensnared a growing number of public figures.

The newspapers compiled the data using court records and documents obtained under the state's Right-to-Know Act. A number of similar requests are still being processed by some independent state agencies, which could drive up the total cost.

In all, the analysis shows, at least 37 cases involving sexual harassment claims have been resolved since 2010 — some did not include a financial settlement. Six cases are pending, and the status of one case could not be determined.

Most of the money paid — at least $2.8 million — went toward settling cases involving employees of departments that report to the governor or the State System of Higher Education. The data cover cases resolved in the last eight years, under Govs. Ed Rendell and Tom Corbett as well as Gov. Wolf. The acts that spurred some cases, however. date back to before 2010.

Asked to comment, a spokesman for Wolf said: "In an enterprise with 73,000 employees, it is unfortunate that incidents may occur. Gov. Wolf's expectation is that victims are supported in an environment in which individuals feel safe to alert decision-makers about harassment, complaints are heard and investigated, and proper action is taken to protect victims and hold people accountable."

In most cases, settlements were funded through the Employee Liability Self-Insurance program, which pays for claims where the state is liable, often covering things like damage to private vehicles. The legislature and the executive branch pay into the fund based on the number of employees they have, past complaints, and other factors that might affect their risk level.

The highest payout, for about $900,000, went to a longtime employee at the Department of Revenue, who claimed a mid-level supervisor, Albert Forlizzi II of Harrisburg, harassed her, sexually assaulted her, and subjected her to racial slurs, including references to slavery. He later pleaded no contest to criminal charges stemming from the allegations, and is serving a probationary sentence.

Also among the highest payments was a $435,000 settlement to a woman who worked for the Pennsylvania State Police who said she was "subjected to quid pro quo sexual harassment and a sexually hostile work environment," according to a federal lawsuit against the agency and the commonwealth. She said she was frequently asked by troopers about her sex life, was inappropriately touched, and was referred to in sexually derogatory terms.

Most of the victims were women, but some were men. A male student at Edinboro University was paid $495,000 in 2010 to settle his claim that his mass communications professor, William Chandler, repeatedly asked him on dates and, he suspected, sent him a pornographic photo of a young man who resembled him. The student also alleged that university officials were aware of previous harassment complaints against the professor.

The revelations of secret taxpayer-funded payouts of sexual harassment cases has stoked calls for change. Several legislators have introduced bills to ban such payouts for elected officials, prohibit confidentiality clauses, or do both.

State Rep. Leanne Krueger-Braneky (D., Delaware) is pushing a package of bills that would, among other changes, deny anonymity and taxpayer bailouts for elected officials who are found, after an investigation, to have mistreated others.

The Inquirer and Daily News and the Post-Gazette have previously reported that House Democrats  quietly paid a $248,000 settlement in 2015 to a woman who worked for State Rep. Thomas Caltagirone (D., Berks). House Democratic officials have said they settled the case to avoid a costlier legal battle. Caltagirone has said he is innocent and had wanted to fight the allegations in court.

House Republicans, as well both caucuses in the Senate, have said that they are not aware of any taxpayer-funded settlement payouts in the last decade for sexual harassment.

But other claims have emerged in recent months. Eight women and three men have told the Inquirer and Daily News that State Sen. Daylin Leach, a Democrat from Montgomery County, made sexualized jokes or inappropriately touched young women who worked for him. Leach has denied any inappropriate touching but acknowledged being "sometimes impulsive and thoughtless" in his humor and pledged to improve his behavior.

Tim Solobay, a onetime Democratic senator from Washington County who was the state's fire commissioner, resigned last month following an allegation that he inappropriately touched a onetime female staffer. He has denied the allegations.

No legal claims have been filed against Leach or Solobay.