Virginia lost about 2,800 technology jobs last year but remains the state with the greatest percentage of private-sector technology workers, according to an annual report on tech industry employment set for release Wednesday.

The District, however, bucked the trend by registering a net gain of 1,400 jobs in its high-technology industry, according to the annual Cyberstates report produced by the TechAmerica Foundation, the nonprofit arm of the industry group TechAmerica.

Virginia has long been known as a high-tech employment powerhouse and is home to just under 278,000 technology-related jobs with an average wage of about $96,000, according to the report.

Those numbers make it the fourth-ranked state by total employment — just behind much-larger California, Texas and New York.

The state’s ranking is “quite impressive, given the size of those states,” said Matthew Kazmierczak, senior vice president and director of the foundation.

Virginia also has the highest concentration, with nearly one in 10 private-sector workers in the tech industry. Virginia has held the top spot in concentration since 2005.

The majority of the Virginia jobs are in computer systems design and related services, in addition to 51,000 engineering services jobs and 44,000 Internet and telecommunications services positions. Many of those jobs are tied to the government sector.

Maryland and the District have fewer tech jobs, but the District joined seven states that experienced growth. The city added 1,400 net tech jobs for a total of 33,500, with an average wage of nearly $96,000.

Maryland stayed essentially flat, losing 400 net jobs for a total of 170,000 tech workers. The state’s average salary for private-sector tech workers was just over $90,000, nearly double the average private-sector wage of almost $48,000.

The region fared better than the nation overall. Nationally, tech industry jobs fell by 115,800, or 2 percent, leaving a total of 5.75 million workers. The drop-off was less than in 2009, when the nation lost 4.1 percent of its technology jobs, suggesting job losses are slowing.

Kazmierczak credited the Washington region with having many of its jobs in software services, an industry that has held up through the downturn.

“In this economy, staying flat is a win,” he said. The losses in Maryland and Virginia are “an indication of the longevity of the downturn. . . . It’s taken a little bit longer for the D.C. metro area . . . to feel some of those effects.”

Still, Kazmierczak is optimistic about how the tech industry has fared in the first half of 2011.

The job gains “were moderate, but they were still going in the right direction,” he said. “The real challenge is what’s the second half of the year going to look like.”