Public companies would have to show the difference in pay between their CEOs and ordinary employees under a proposal advanced by federal regulators.

The Securities and Exchange Commission voted 3-2 Wednesday to propose a rule that would compel companies to report that information publicly. Companies would have to report the ratio between their chief executive’s annual compensation and the median, or midpoint, pay of employees.

The two Republican commissioners, Daniel Gallagher and Michael Piwowar, opposed the proposal, calling it political showmanship meant to publicly “shame” CEOs.

“Shame on us for putting special interests ahead of investors,” Piwowar said before the vote.

Business groups such as the U.S. Chamber of Commerce vigorously oppose the requirement, saying it will be costly and time consuming for companies to gather the pay information on their employees. The mandate also could put U.S. companies at a disadvantage relative to their foreign competitors, the business interests say.

Under the proposal, companies would have the choice of calculating median employee pay from their total workforce or based on a sample of it.

The SEC opened the proposal to public comment for 60 days; it could be formally adopted sometime after that.

The move was called for by the 2010 financial overhaul law. Executive compensation is a hot-button issue with the public and in Congress, and it took on greater urgency during the financial crisis that began in the fall of 2008.

Outsize pay packages were blamed for encouraging disastrous risk-taking and short-term gain at companies at the expense of long-term performance.

Investor advocates, shareholder groups and union pension funds have pushed for reporting of the CEO-employee pay gap.

Reflecting the intense interest, the SEC received more than 20,000 comment letters on the issue.

Critics say the pay gap between CEOs and workers has widened sharply in recent decades. CEOs of major corporations earned 354 times more compensation last year than average American workers, double the gap in the early 1990s, according to the left-leaning Institute for Policy Studies think tank.

The SEC in 2011 gave shareholders at public companies the right to register their opinions on the executives’ pay at least once every three years, in a non-binding vote.

The SEC also voted 5-0 Wednesday to require registration with the agency for municipal advisers, who give advice to cities and towns that issue bonds on their bond sales and investing the proceeds.

Scandals in several municipalities, notably Jefferson County, Ala. — which filed what was the biggest U.S. municipal bankruptcy to that point in November 2011 — brought to light conflicts of interest and abuses by some municipal advisers.