Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Federal regulators on Wednesday voted to require companies to reveal the pay gap between CEOs and their employees.

The Securities and Exchange Commission voted Wednesday to order most public companies to disclose the ratio between their chief executives' annual compensation and median, or midpoint, employee pay. The new rule will take effect starting in 2017.

The issue of executive pay has generated heated debate. The 3-2 vote came on one of the most controversial rules the agency has put forward in recent years. The SEC received more than 280,000 comments on the issue since it floated the proposal two years ago, and lobbying by business interests against the requirement was intense.

The SEC acted under a mandate from the 2010 law that reshaped regulation after the financial crisis. Outsize pay packages — often tied to the company's stock price — were blamed for encouraging disastrous risk-taking and short-term gain at the expense of long-term performance.

Under the SEC's final rule, companies will get some flexibility in how they find the median. For instance, they can exclude 5 percent of their overseas workers, if they have any, and use statistical sampling to arrive at the number. Smaller public companies — those with less than $75 million in total shares held externally or less than $50 million in annual revenue — are exempt from the disclosure. So are emerging growth companies and investment companies.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"These are good and reasonable changes that should reduce costs for many companies" while still meeting the financial overhaul law's mandate, SEC Chair Mary Jo White said before the vote.

Those changes are not likely to assuage corporate trade groups, which are widely expected to file a legal challenge.

The SEC had been under mounting pressure by Democrats, including Sen. Elizabeth Warren of Massachusetts, and unions, who support the rule and have lamented delays in its adoption.

Why corporate CEO pay is so high, and going higher

The measure was tucked into the 2010 Dodd-Frank law amid concerns about the growing disparity between compensation for chief executives and their corporate workers.

Republicans and trade groups like the U.S. Chamber of Commerce fought back against the measure at every turn, saying it will be too expensive, could mislead investors and is not material to a company's financial statements.

The Rich Really Aren't Like Us: They Think We're As Loaded As They Are

In a lengthy 2013 letter, the Chamber urged the SEC to defer working on the rule at all and instead conduct a pilot program and roundtable in order to come up with a different plan.

It also urged the SEC not to force companies to include the ratio in formal filings and allow them to place it into an addendum to help reduce their liability.

In Plain Sight: Poverty in America

Companies will have to start reporting the new pay ratio disclosures in the first fiscal year beginning on or after Jan. 1, 2017.