Police in Japan's southern prefecture of Okinawa have told NHK that the entrance to the main hall at Shurijo Castle was found closed shortly after the fire started.
The blaze is believed to have started in the main hall early Thursday morning. It was put out 11 hours later, by which time most of the castle's major buildings had been destroyed.
Police say a sensor installed on the north side of the main hall detected an issue and sent out an alert. A security guard hurried over to the site and found the entrance to be closed.
They say the guard unlocked the shutter, entered the hall, and found it was already filled with smoke.
Workers had been preparing for an event in the central court in front of the main hall until about one hour before the fire started.
Police are looking into whether the workers were properly using electricity. They plan to begin an on-site investigation on Friday to determine what caused the fire.
Shurijo Castle was built some 500 years ago but was destroyed in the Battle of Okinawa toward the end of World War Two. The main hall and other buildings were later reconstructed.
The ruins of the original castle have UNESCO World Heritage status. The restored buildings do not.
The central government is considering adding funds to a supplementary budget for the current fiscal year to support restoration work.
Chief Cabinet Secretary Yoshihide Suga says the government will do all it can to reconstruct the buildings, calling Shurijo Castle an extremely important symbol of Okinawa.
Some lawmakers are also pushing for measures to support Okinawa, saying the number of tourists to the prefecture may decline.