* Man, 57, tests positive four times for virus in Danang

* First local infection for 100 days

* Hanoi reinstates mandatory mask wearing order

HANOI, July 25 (Reuters) - Vietnam was back on high alert for the novel coronavirus on Saturday after medical officials in the central city of Danang detected, its first locally transmitted case for three months.

Thanks to strict quarantine measures and an aggressive and widespread testing programme, the Southeast Asian country has kept its virus total to an impressively low 415 cases and had reported no locally transmitted infections for 100 days.

Vietnam has reported no deaths from the virus.

But on Friday, the health ministry said a 57-year-old man from Danang, a tourist hot spot, had tested positive, prompting the isolation of 50 people he came in contact with.

The ministry said 103 people connected to the patient were tested for the virus but all returned negative results.

The government said on Saturday a new test had confirmed the man's infection, bringing the total number of cases in Vietnam to 416.

It did not say how the man contracted the virus but that he had not left Danang for nearly a month. He was initially diagnosed with pneumonia.

The case comes at a time when Vietnam was about to resume international commercial flights and as domestic tourism is surging.

Late on Friday, authorities in the capital, Hanoi, reinstated a recommendation to wear masks in public places as Vietnam's benchmark VN Index closed down 3.22%.

Vietnam's ban on international commercial flights is still in place, but foreign experts and skilled workers have been able to enter provided they undergo mandatory centralised quarantine.

Of the nearly 150 cases reported over the past three months, all were imported in people quarantined on arrival.

Earlier this week, Vietnam said it would repatriate about 130 Vietnamese citizens infected with the virus from Equatorial Guinea.

In March, Danang reported six local cases of the coronavirus as the U.S. aircraft carrier Theodore Roosevelt, which reported cases on board, conducted a port visit. There was no confirmation the six cases were linked to the ship. (Reporting by Khanh Vu and Phuong Nguyen Editing by James Pearson)