Sparks from a short circuit that occurred when a train resumed operation apparently melted and severed an overhead cable, leaving thousands of people stranded on Tuesday evening in Yokohama, East Japan Railway Co. said Wednesday.

The incident occurred at 7:10 p.m. on a section of track where trains do not usually stop. The train was halted manually, rather than using the automatic control system, in the section due to congestion caused by spectators traveling to a fireworks festival, the company said.

"We have caused lots of trouble to many customers," said Akira Yakushi, a public relations official for JR East. "We will take preventive measures and do our best to recover trust."

The incident caused the cancellation of 150 trains and another 159 to be delayed for up to six hours and 20 minutes on JR lines linking Tokyo, Yokohama and elsewhere. The stoppage affected around 350,000 passengers.

As repair work continued through Wednesday, 10 early morning trains were canceled, before services fully resumed shortly after 5:30 a.m., JR East said.

The cable was severed between Yokohama and neighboring Sakuragicho stations in a waterfront area of the port city where the fireworks show drew large crowds Tuesday evening.