The unemployment rate fell in Maryland in August but ticked up in the District and Virginia, the Labor Department reported Friday.

The data offered a mixed portrait of how the region’s job market is faring as federal spending cuts create a fog of uncertainty for local businesses.

The jobs situation looked bleakest in the District, where the unemployment rate rose to 8.7 percent from 8.6 percent as the economy shed 2,000 jobs. Job losses were seen in the city’s two largest industries: the government sector, which lost 2,400 jobs, and professional services, which lost 1,300. Those categories are also the ones most likely to be affected by government spending cuts.

The only sectors to add jobs in the District were education and health services, which gained 1,200 positions, and leisure and hospitality, which added 700.

Virginia’s job market was a bit more muddled. The unemployment rate inched up to 5.8 percent from 5.7 percent as the economy added 1,900 jobs. But the commonwealth’s labor force shrank, which suggests that fewer people are looking for work there.

“The conventional wisdom had been that in the face of sequestration, Virginia, with its reputation of a better business climate, would fare better overall than Maryland. That’s not necessarily been the case,” said Anirban Basu, chief executive of Sage Policy Group, a Baltimore economic consulting firm.

Virginia added 3,000 jobs in the important professional services sector, which includes government contractors. But it shed 900 government jobs. And it posted even steeper job losses in other categories, such as construction, which lost 2,500 positions, and retail and trade, which lost 3,900 positions.

The report for Maryland, however, offered more reasons for optimism. The state added 9,700 jobs, a gain that means it has recovered all the jobs it has lost since the recession. Its unemployment rate fell to 7 percent from 7.1 percent.

Maryland posted an increase of 3,600 jobs in the professional services sector and a gain of 4,800 jobs in the government sector. The increases in that sector were driven by local governments; the state shed 1,800 positions in the federal government subcategory.

The state also added jobs in industries including leisure and hospitality as well as education and health services.

“Maryland is moving forward slowly but surely,” said Daraius Irani, director of the Regional Economic Studies Institute at Towson University. Irani cited the gains in the professional services category as a particularly promising sign because positions in these fields tend to be high-paying.

The national unemployment rate fell to 7.3 percent in August as the economy added 169,000 jobs. Even as the jobless rate continues to fall, Labor Department data show that 63.2 percent of working-age Americans have a job or are looking for one, the lowest level of labor force participation it has recorded in 35 years.

Jobless rates rose in 18 states, decreased in 17 states, and held steady in 15 states. The highest unemployment rate, 9.5 percent, was recorded in Nevada. North Dakota’s jobless rate, 3 percent, was again the lowest in the nation.