Mayor Vincent C. Gray (D) scored a legislative victory Wednesday when the D.C. Council backed away from a plan to slash the number of political appointees that mayors can appoint to their staffs.

In response to Gray’s controversial hiring practices, Council member Mary M. Cheh (D) sponsored a proposal that would have slashed so-called “excepted services” positions from 160 to 100. But an aggressive last-minute lobbying effort by Gray’s legislative staff derailed the proposal, winning over a clear majority on the council.

Before a vote on the bill, which also codifies new requirements requiring background and credit checks for mayoral appointees, Gray’s office circulated a letter raising concerns about plans to slash excepted service positions.

“It is important to examine Excepted Service appointments as a means of providing the executive branch with flexibility to use deliberate speed and effectiveness to respond to every changing circumstances,” the letter stated. “One of the primary benefits of the Excepted Service position is that agency heads are able to quickly fill important positions.”

Under current rules, the mayor has direct control over 160 appointments in his office and that of the city administrator. Most of the other 32,000 city employees are selected through the competitive civil service process.

After Gray raised concerns about Cheh’s plan to slash that number to 100, Council member Muriel Bowser (D-Ward 4) floated a compromise Wednesday morning that would have given the administration 130 positions. But Gray’s staff questioned why council members were trying to impose new restrictions on the mayor’s office that it wasn’t willing to adopt for their own staffers.

“As a matter of comity, the number of Excepted Service appointees by the mayor has traditionally been similar to the number of Excepted Service appointees by the council,” Gray wrote in his letter.

After a brief debate on the dais, Council member Jack Evans (D-Ward 2) moved an amendment granting Gray the 160 positions; the amendment was adopted by a vote of nine to three.

The council then overwhelming approved the legislation, which also mandates that mayoral appointees be “well-qualified” for the jobs to which they are hired.