Former Pennsylvania Treasurer Barbara Hafer got off with a wrist slap — three years' probation and a $50,000 fine — after lying to federal agents about the nearly $700,000 she pocketed from a middle man who made millions off the state.

The case illustrates how the rules often differ for public officials. It also underscores the need for stricter campaign finance measures in Harrisburg, where pay-to-play often drives public policy.

Hafer, 74, was charged with two counts of making false statements after she misled FBI and IRS agents about $675,000 in payments her consulting firm received from Chester County businessman Richard Ireland after she left office. He made more than $10 million in fees from the state while Hafer ran the Treasury Department between 1997 and 2005.

Investigators caught Ireland boasting on tape that he had taken care of Hafer. The tape was secretly recorded by another former treasurer, Rob McCord, who was cooperating with federal authorities. McCord pleaded guilty to corruption charges in 2015.

In 2005, Ireland paid Hafer's firm $500,000 — two-thirds of the firm's business that year. Yet, Hafer told agents in 2016 that she had not received any money from Ireland or any of his businesses.

Hafer pleaded guilty in June to one count of lying to the FBI. At her sentencing last week, Hafer apologized and told U.S. District Judge John E. Jones III, "I did it. It was wrong."

Hafer's attorney offered a comical defense, arguing her false statements to federal authorities were the "result of a poor decision made in response to a high-stress situation." Hafer's daughter provided character testimony, claiming her mother is "by far the best person I know and love."

Few admitted felons who lie to the FBI, and then claim poor decision-making, are lucky enough to just get probation. Hafer's kid-gloves treatment sends a message that public officials are above the law and undermines public trust in government.

No wonder. Too often, public service turns into elected officials serving themselves and their deep-pocketed campaign donors. Typical taxpayers are an afterthought, if that.

Pay-to-play, greed, and cronyism also undermine the work of those elected officials who are truly dedicated to public service. Harrisburg particularly is largely run by insiders for insiders.

One way to limit the influence-peddling that ensnared Hafer is through stricter campaign finance laws. Pennsylvania is one of only a handful of states with no limits on campaign contributions. Gerrymandered districts also help keep elected officials in power and beholden to major donors.

To his credit, current state Treasurer Joe Torsella made good on a campaign pledge to prohibit the use of placement agents, such as Ireland, who helped private firms land lucrative contracts to manage a portion of the state office's up to $16 billion in investments.

But that pledge is only as good as Torsella's word. Who knows what will happen when he is no longer treasurer? His policy should be codified by state lawmakers to prevent future treasurers from backsliding to the pay-to-play culture.

The same policy should be instituted for the state's pension funds, which manage tens of billions of dollars more than the treasurer, yet continue to use placement agents.

Meanwhile, stricter campaign limits for all elected officials would help reduce the influence of money in Harrisburg. So too would tougher sentences for corrupt public officials.