We present a study of comet C/2017 K2 (PANSTARRS) using prediscovery archival data taken from 2013 to 2017. Our measurements show that the comet has been marginally increasing in activity since at least 2013 May (heliocentric distance of rH=23.7 AU pre-perihelion). We estimate the mass-loss rate during the period 2013--2017 as M˙≈(2.4±1.1)×102 kg s−1, which requires a minimum active surface area of ∼10--102 km2 for sublimation of supervolatiles such as CO and CO2, by assuming a nominal cometary albedo pV=0.04±0.02. The corresponding lower limit to the nucleus radius is a few kilometers. Our Monte Carlo dust simulations show that dust grains in the coma are ≳0.5 mm in radius, with ejection speeds from ∼1--3 m s−1, and have been emitted in a protracted manner since 2013, confirming estimates by Jewitt et al. (2017). The current heliocentric orbit is hyperbolic. Our N-body backward dynamical integration of the orbit suggests that the comet is most likely (with a probability of ∼98\%) from the Oort spike. The calculated median reciprocal of the semimajor axis 1 Myr ago was amed−1=(3.61±1.71)×10−5 AU−1 (in a reference system of the solar-system barycentre).