A federal judge Thursday rejected a request for $3.1 million in legal fees for lawyers who worked to overturn the District’s handgun ban and instead awarded them $1.1 million, a ruling the D.C. attorney general called a victory for the city.

The six attorneys for plaintiff Dick A. Heller in the historic gun-control litigation had asked the judge to order the city, which lost the case, to pay legal fees totaling $3,126,397. The office of D.C. Attorney General Irvin B. Nathan argued the city should be required to pay $840,166.

In a 65-page ruling filled with calculations and analyses of market rates for legal work, U.S. District Court Judge Emmet G. Sullivan in Washington decided that $1,132,182 would be fair.

Noting in a statement that “attorneys’ fees and costs are routinely granted to successful plaintiffs in civil-rights cases under federal law,” Nathan called the $3.1 million request “outlandish.” He praised the judge for substantially reducing “the lawyers’ requested hourly rates and the number of hours for which they charged.”

Heller’s lawsuit against the city over its decades-old ban on handgun ownership led to a landmark decision by the U.S. Supreme Court, which ruled in 2008 that the Second Amendment guarantees the right to own firearms. The decision forced the District to enact a registration system for residents who want to own handguns.

In a statement Thursday, Heller’s attorneys said they “respectfully disagree with Judge Sullivan’s determination of the hourly rates at which fees should be calculated in this case.” Sullivan based part of his calculations on a model called “the U.S. Attorney’s Office Fee Matrix,” which the lawyers called “outmoded.”

“That matrix bears little if any relationship to the prevailing hourly rates for complex litigation in the Washington, D.C., market, nor do we believe the rates provided in the USAO matrix accurately reflect the exceptional quality of the legal work performed by plaintiff's counsel in securing this historic win,” the statement said.

Neither the city nor Heller’s attorneys would comment on whether they intend to appeal any aspect of Sullivan’s ruling.