The nation’s capital chalked up its best year yet for tourism in 2016, boosted by the opening of the National Museum of African American History and Culture, a lively presidential election, some 15 citywide conventions, and such events as an Atlantic Coast Conference basketball tournament.

Destination D.C., the city’s tourism arm, reported that 20 million people from across the United States visited last year and spent about $7.3 billion, according to data analyzed by the travel research firm D.K. Shifflet & Associates. That’s a 3.6 percent improvement over 2015 that tops off a seven-year climb for tourism in the city.

The data released last week does not include visits by international travelers; that information is traditionally released later. International travel could be hurt in 2017 by worries over travel bans and new immigration restrictions. But domestically, tourism is likely to hold up, if for no other reason than the city has already held a presidential inauguration and has been the site of several large national weekend protests, which tend to include a portion who stay in hotels and extend their stays.

The city already has booked 21 citywide conventions for 2017, hosted a Big Ten basketball tournament, and the District will benefit from a full year of operation of the Smithsonian’s new $540 million African American Museum. The museum welcomed 1,211,563 visitors in its first six months after opening last September, placing it among the four most-popular Smithsonian museums.

Tourism officials said the influx of out-of-town cash is translating into new opportunities for employment.

“You’re talking about jobs that did not exist that are being created,” said Elliott Ferguson, president and chief executive at Destination D.C.

Spending at hotels, restaurants, stores and entertainment venues jumped by a few percentage points over 2015, suggesting the increased foot traffic is helping local businesses. That could be partially responsible for what was seen as a strong year for job creation in the District last year, as unemployment rates edged down and the pace of job growth last year consistently outstripped the nation as a whole.

Last year, the bulk of new jobs came in the leisure, hospitality and retail sectors, where business success is closely tied to consumer spending. That’s a departure from past years, when job creation occurred in higher-paying federal contractors, law firms and other government-centric industries. Leisure and hospitality jobs now account for about 9.9 percent of the broader region’s employment base, a share that has steadily grown. Most of the gains accrued to bars and restaurants.

“It’s money coming from outside the region being spent in the region, so that’s certainly a good thing,” said Mark White, an economist who studies the local job market.

Still, some economists say the boost from tourism is hardly a substitute for growing other parts of the economy. Some estimates hold that it takes about three retail or restaurant jobs to provide the economic equivalent of just one federal government or white-collar post.

Such jobs also tend to be less secure. Even when restaurant jobs pay well, they’re more likely to be hourly or part-time, which are often the first to go when the economy takes a turn.

“It’s a very valuable industry for us, and it generates a lot of money in the region, but it’s a poor substitute for good, advanced technology jobs,” said Terry Clower, director of the George Mason University Center for Regional Analysis.

Others argue that low-wage jobs do a lot for unskilled workers even if they are part-time.

Hospitality “is one of the few industries that creates jobs at different levels,” said Ferguson, of Destination D.C. “You’re looking at an industry that creates new jobs for those that don’t necessary have a lot of job skills.”

Beyond jobs, economy watchers say tourism might have something else to contribute aside from wages. After all, a lot of the attractions that tourists support are also enjoyed by locals.

“Were it not for that extra visitation, the local economy would have access to fewer restaurants, meeting venues, and fewer opportunities for leisure and cultural expression,” said Anirban Basu, an economist with Sage Policy Group. Without tourists “the museums would be weaker, the art galleries wouldn’t be as strong.”