We report the serendipitous discovery with XMM-Newton that 3XMM J185246.6+003317 is an 11.56 s X-ray pulsar located 1' away from the southern boundary of supernova remnant Kes 79. The spin-down rate of 3XMM J185246.6+003317 is < 1.1 x 10(-13) s s(-1), which, together with the long period P = 11.5587126(4) s, indicates a dipolar surface magnetic field of < 3.6 x 10(13) G, a characteristic age of >1.7 Myr, and a spin-down luminosity of <2.8 x 10(30) erg s(-1). Its X-ray spectrum is best-fitted with a resonant Compton scattering model and also can be adequately described by a blackbody model. The observations covering a seven-month span from 2008 to 2009 show variations in the spectral properties of the source, with the luminosity decreasing from 2.7 x 10(34) erg s(-1) to 4.6 x 10(33) erg s(-1), along with a decrease of the blackbody temperature from kT approximate to 0.8 keV to approximate to 0.6 keV. The X-ray luminosity of the source is higher than its spin-down luminosity, ruling out rotation as a power source. The combined timing and spectral properties, the non-detection of any optical or infrared counterpart, together with the lack of detection of the source in archival X-ray data prior to the 2008 XMM-Newton observation, point to 3XMM J185246.6+003317 being a newly discovered transient low-B magnetar undergoing an outburst decay during the XMM-Newton observations. The non-detection by Chandra in 2001 sets an upper limit of 4x 10(32) erg s(-1) to the quiescent luminosity of 3XMM J185246.6+003317. Its period is the longest among currently known transient magnetars. The foreground absorption toward 3XMM J185246.6+003317 is similar to that of Kes 79, suggesting a similar distance of similar to 7.1 kpc.