The House Financial Services Committee voted Wednesday to cap the salaries of the top officials at Fannie Mae and Freddie Mac at their current level of $600,000 annually.

The vote was near-unanimous with 57 lawmakers backing the cap. Stephen Lynch, D-Mass., cast the lone vote in opposition.

The legislation, dubbed the Equity In Government Compensation Act, was prompted by concerns that the Federal Housing Finance Agency, which oversees the mortgage buyers, would approve salaries as high as $7.2 million for the CEOs.

"Multi-million dollar paydays for the CEOs of Fannie and Freddie represent a failed grasp of reality on the part of both the GSEs and their regulator," said Rep. Ed Royce, R-Calif., the chief sponsor of the legislation.

The bill was introduced after Freddie Mac revealed in its most recent filing to the Securities and Exchange Commission that the housing finance agency had said it "may not propose compensation for the CEO that is higher than the 25th percentile of the market, using the agreed-upon comparator group for FHFA evaluation of compensation of Freddie Mac's executive officers."

Raising the executives' pay to the 25th percentile would put their compensation packages at about $7.2 million annually, based on current CEO pay levels.

The CEOs of Fannie Mae and Freddie Mac are, respectively, Timothy Mayopoulos and Donald Layton. They have previously defended increasing executive pay compensation, saying it was necessary to attract and retain talented managers at the government-sponsored enterprises.

Fannie Mae and Freddie Mac purchase mortgages and resell them as securities. Though founded by the federal government, they were intended to function as private companies with the goal of making housing affordable for lower-income families. Their quasi-private status and the implicit government backing of their securities gives them an edge over their private-sector competitors.

Democrats are usually staunch defenders of the two companies, but Rep. Maxine Waters, the committee's ranking minority member backed the cap.

Officials in President's Obama's administration have expressed opposition as well. A Treasury Department spokesman told the Wall Street Journal earlier this month that it "does not support FHFA's new approach to CEO compensation at Fannie Mae and Freddie Mac and urged the agency to reject any increase." However, the spokesman also said that "FHFA ultimately has sole authority over executive compensation at both enterprises."