A major glitch that occurred last Friday in Japan Airlines Co.'s weight management system was caused by a faulty computer program designed by Deutsche Lufthansa AG, the Japanese carrier has said.

JAL said that Lufthansa had admitted to faults with the program, but that it was "difficult to prevent such system trouble."

Friday's glitch led to the cancellation of 50 domestic flights to and from Tokyo's Haneda airport that day, affecting about 24,000 passengers, according to JAL.

JAL commissioned the program through a computer system firm under the Lufthansa group. JAL started using the program in 2014 and updated it only two weeks ago.

Although the latest version was supposed to fix programming bugs, it failed to do so, JAL said.

JAL said it would take time to totally fix the program but promised the same glitch would not happen again.

The trouble occurred at around 7:50 a.m. Friday, prompting JAL to deploy an alternative system. The processing speed slowed significantly while the alternative system was used.