Thanks to the hefty incomes of D.C. newcomers, the timely passing of a few wealthy residents, and thousands upon thousands of speeding-camera tickets, the District’s coffers are sitting pretty.

D.C. finance officials estimated Friday that, with two days remaining in its fiscal year, the D.C. government is running a nearly $140 million operating surplus.

In a letter Friday to top city officials, Chief Financial Officer Natwar M. Gandhi said about one-third of the projected $139.5 million surplus is due to an estate tax “windfall,” with another third due to increases in income tax withholding.

Of the remainder, about half can be attributed to increased sales taxes, and the rest to $23 million in “automatic traffic enforcement” revenue — that is, speeding and red-light camera fines.

Despite the stronger-than-expected collections this fiscal year, Gandhi is not upgrading his revenue estimates for the next fiscal year, citing ongoing concerns about the potential effects of federal defense spending cuts.

A “double whammy” of severe federal cutbacks and the recession they would likely create, Gandhi wrote, “would almost certainly hurt the District’s economy and finances.” But if Congress can step away from the “fiscal cliff,” he added, “the revenue picture for the District would improve substantially.”

Mayor Vincent C. Gray (D) said in a statement that the pending surplus “is affirmation that we are reaping the benefits of our investments in growing the District’s economy and getting our residents back to work.” He also called on Congress to “act quickly to prevent what everyone agrees is a completely unacceptable and destructive means of reducing the federal budget.”

Last fiscal year, audited figures showed that the city ran a $240 million surplus, leading Gray and council members to wonder why they had been forced to consider tax hikes and sometimes drastic spending cuts. Gray and Gandhi later clashed over what Gray called “unrealistically low” revenue estimates.

The new windfall has renewed calls to relieve the impact of prior cuts. D.C. Council member Jim Graham (D-Ward 1) said the surplus could fund a list of 29 now-unfunded line items in the 2013 budget that goes into effect Monday.

The council identified those items — ranging from services for the homeless to housing assistance to additional firefighter recruits — as key priorities that could be funded with future increases in 2013 revenue estimates.

The 2013 projections remain stagnant, but Graham said the funding priorities “should now be triggered in some fashion” by the 2012 surplus.

But both Gray and Council Chairman Phil Mendelson (D) said the money will remain in the bank, in keeping with a recent law intended to bulk up the city’s savings.

The surplus represents about a 1.3 percent variance from the District’s anticipated $10.8 billion in 2012 spending. The final audited number for the current fiscal year won’t be available until late January or early February.