TOKYO — Japan had only a few dozen confirmed coronavirus infections when the 30-something nurse with a slight sore throat boarded a bus to Osaka, the country’s third-largest city, to attend a Valentine’s weekend performance by pop bands at a music club.

Less than two weeks later, she tested positive for the virus, and the authorities swiftly alerted others who had been at the club. As more infections soon emerged from three other music venues in the city, officials tested concertgoers and their close contacts, and urged others to stay home. All told, 106 cases were linked to the clubs, and nine people are still hospitalized.

But less than a month after the nurse tested positive, the governor of Osaka declared the outbreak over.