The object P/2013 P5 PANSTARRS was discovered in August 2013, displaying a cometary tail, but its orbital elements indicated that it was a typical member of the inner asteroid main belt. We monitored the object from 2013 August 30 until 2013 October 05 using the CFHT 3.6 m telescope (Mauna Kea, HI), the NTT (ESO, La Silla), the CA 1.23 m telescope (Calar Alto), the Perkins 1.8m (Lowell) and the 0.6 m TRAPPIST telescope (La Silla). We measured its nuclear radius to be r < ∼ 0.25−0.29 km, and its colours g − r = 0.58 ± 0.05 and r − i = 0.23 ± 0.06, typical for an S-class asteroid, as expected for an object in the inner asteroid belt and in the vicinity of the Flora collisional family. We failed to detect any rotational light curve with an amplitude <0.05 mag and a double-peaked rotation period <20 h. The evolution of the tail during the observations was as expected from a dust tail. A detailed Finson-Probstein analysis of deep images acquired with the NTT in early September and with the CFHT in late September indicated that the object was active since at least late January 2013 until the time of the latest observations in 2013 September, with at least two peaks of activity around 2013 June 14 ± 10 d and 2013 July 22 ± 3 d. The changes of activity level and the activity peaks were extremely sharp and short, shorter than the temporal resolution of our observations (∼1 d). The dust distribution was similar during these two events, with dust grains covering at least the 1-1000 µm range. The total mass ejected in grains <1 mm was estimated to be 3.0 × 10 6 kg and 2.6 × 10 7 kg around the two activity peaks. Rotational disruption cannot be ruled out as the cause of the dust ejection. We also propose that the components of a contact binary might gently rub and produce the observed emission. Volatile sublimation might also explain what appears as cometary activity over a period of 8 months. However, while main belt comets best explained by ice sublimation are found in the outskirts of the main belt, where water ice is believed to be able to survive buried in moderately large objects for the age of the solar system deeply, the presence of volatiles in an object smaller than 300 m in radius would be very surprising in the inner asteroid belt.