HONG KONG — Ending a 13-month slide, mainland Chinese visitors to Hong Kong rose for the first time in July, raising hopes that some of the city’s retail woes may soon turn around.

Mainland Chinese tourists rose 2.6 percent last month over the same time last year, after showing gradual improvement over the last six months.

The extended decline had been spurred by a confluence of factors including a slowing Chinese GDP, tightened mainland Chinese visa restrictions to Hong Kong, and negative sentiment in the city toward mainland Chinese tourists.

Hong Kong’s retail sector is heavily reliant on such tourists, who made up 77 percent of all visitors to Hong Kong last year.

The city is also facing tough competition from other regional destinations including Japan, South Korea and Thailand which offer greater novelty for shoppers.

The positive numbers come just after retailers logged their worst first half decline for sales in nearly two decades. Retail sales sank 10.5 percent from the year before, the worst dip since 1999.

“Barring any incidents and if the healthy trend persists, we are positive about the rest of the year,” Hong Kong Tourism Board chairman Peter Lam Kin-ngok said, according to local newspaper the South China Morning Post.

In June, Hong Kong’s Secretary for Commerce and Economic Development Gregory So addressed concerns over the challenging environment saying cultural events such as dining festivals, a new Formula-E racing championship in the city and efforts to play up the city’s heritage by promoting art projects and natural landscapes would help in turn the industry performance around.