People rally against the shutdown on Jan. 10. The government will reopen for at least three weeks, but ripple effects of the closure will linger. (Alex Wroblewski/Bloomberg News)

The longest-ever federal government shutdown will cost the Washington region more than $1.6 billion in lost economic output according to one estimate, but its most significant long-term damage may be to the area’s image and self-confidence.

The shuttering of a quarter of federal agencies tarnished the government’s reputation as a reliable business partner and desirable employer, according to civic leaders, business owners and other analysts. It eroded morale of a quarter-million local federal workers and contractors who missed paychecks for more than a month.

And the fear is that it will prompt more firms and employees to seek work in the private sector, and hurt the area’s allure to attract investment.

“Trust and hope are gone,” said Emily Newlan, president of Hedgelan Consulting in Gaithersburg, Md., which stands to lose more than $10,000 in revenue from suspension of an administrative contract with the National Agricultural Library.

“Recruitment has already been hurt. People are going to go look for other jobs,” Newlan said. “They can say, ‘I don’t need this uncertainty.’ ”

Under a deal reached Friday between the White House and Congress, the entire government will reopen for three weeks while talks continue on President Trump’s demand for funding for a wall on the nation’s southern border. So even as local leaders expressed relief that the shutdown had ended, they worried that it might resume by mid-February.

“Five hundred hours until we might need to do this all again,” said Chuck Bean, executive director of the Metropolitan Washington Council of Governments.

The impact will linger even if the government stays open, he said.

“Effects are going to ripple through our communities long after it ends,” Bean said. “Contractors did not get paid and many of them won’t. Furloughed employees racked up credit card bills. Many local businesses won’t get January back.”

Jack McDougle, president of the Greater Washington Board of Trade, said the unwillingness of Trump and Democratic leaders to compromise had aggravated people’s concerns.

“I definitely think the psychological and emotional impact was really huge,” McDougle said. “Both sides were digging in their heels. . . . That added a whole level of stress that you might not normally get.”

He added that the shutdown highlighted the need for the region to attract more private-sector businesses, such as by building on Northern Virginia’s success in winning the competition to host one of Amazon’s new East Coast headquarters.

“We’ve got to make sure we leverage Amazon to a much bigger effect, so it creates a lot of additional opportunities,” McDougle said. (Amazon CEO Jeffrey P. Bezos owns The Washington Post.)

The shutdown’s cost in dollars and cents was significant but would have been much worse had the shutdown lasted another month, according to longtime regional economist Stephen S. Fuller of George Mason University.

Fuller estimates the loss of economic activity in January alone at $1.6 billion. Additional losses from the final days of December, a holiday period, were “small but real,” he said.

His calculation assumes that the 145,000 federal workers in the area who were furloughed or forced to work without pay will receive back pay, as guaranteed under a law signed by Trump. Based on experience, the 112,500 federal contractors in the area who missed paychecks will not be compensated retroactively.

The net effect is to lower the region’s growth rate for the year by one-tenth or one-fifth of a percentage point to a projected range of 2.7 percent to 2.8 percent, Fuller said.

“It should have been the best year of the decade,” Fuller said. “It’s going to struggle to fulfill its potential.”

The people hurt most by the shutdown include low-paid maintenance, food service and retail workers on contracts in federal buildings that were closed. The restaurant industry said average sales dropped 20 percent, with some establishments down 60 percent.

Restaurant operators “have had to reduce hours, cut staff [and] temporarily reduce the days they are open,” said Kathy E. Hollinger, president and chief executive of Restaurant Association Metropolitan Washington. “Businesses will have a long struggle to make up the revenue they expected to earn in January.”

Some firms harmed in the shutdown were beneficiaries of programs that give preferential treatment in doling out federal contracts to small businesses, and especially to ones owned by veterans, women, minorities, or located in historically depressed areas.

Advanced Management Strategies Group in Dumfries, Va., led by two service-disabled military veterans, suffered from suspension of a Federal Trade Commission contract.

“The impact to our financials is in the tens of thousands of dollars,” President Jim O’Farrell said.

O’Farrell’s company, half of whose employees are veterans, advises federal agencies on how to operate more efficiently.

Elise M. Ambrose, president of Elite Personnel, a temp agency in Bethesda, Md., said the shutdown ended just in time.

“In a couple more weeks, we would have gone over a cliff,” Ambrose said.

Her business dropped 20 percent last week, she said, as local businesses stopped hiring temp workers because of concern over the shutdown.

“When businesses gets nervous, the first thing they do is stop hiring,” she said.

The shutdown delivered a one-two punch to local governments, who saw tax revenue drop and demand for social services rise. The office of D.C. Chief Financial Officer Jeffrey S. DeWitt estimated the total loss of sales tax and fee revenue at $39 million through Friday.

The philanthropic community treated the shutdown as a major local crisis and revived emergency assistance programs for unpaid workers that it originally set up in the 2013 shutdown.

United Way of the National Capital Area provided $50,000 to local charities to cope with increased demand, a figure matched by $50,000 from Pepco and $10,000 from Bank of America.

United Way NCA President Rosie Allen-Herring said the shutdown turned out to be more injurious than initially anticipated, as it dragged on and people outside the federal workforce were affected.

“The impact cannot be overstated,” Allen-Herring said. She said people in the area may be less willing to donate to charity as a result.

“I’m worried about whether people are going to feel generous at all, and especially that [federal] workforce, considering that in their minds, they have been the victims,” Allen-Herring said.

This story has been updated.