Solar flares are generally believed to be powered by free magnetic energy stored in the corona 1 , but the build up of coronal energy alone may be insufficient for the imminent flare occurrence 2 . The flare onset mechanism is a critical but less understood problem, insights into which could be gained from small-scale energy releases known as precursors, which are observed as small pre-flare brightenings in various wavelengths (e.g., refs 3-13 ), and also from certain small-scale magnetic configurations such as the opposite polarity fluxes [14][15][16] , where magnetic orientation of small bipoles is opposite to that of the ambient main polarities. However, high-resolution observations of flare precursors together with the associated photospheric magnetic field dynamics are lacking. Here we study precursors of a flare using unprecedented spatiotemporal resolution of the 1.6 m New Solar Telescope, complemented by novel microwave data. Two episodes of precursor brightenings are initiated at a small-scale magnetic channel 17-20 (a form of opposite polarity fluxes) with multiple polarity inversions and enhanced magnetic fluxes and currents, lying near the footpoints of sheared magnetic loops. The low-atmospheric origin of these precursor emissions is corroborated by microwave spectra. We propose that the emerging magnetic channel field interacts with the sheared arcades to cause precursor brightenings at the main flare core region. These high-resolution results provide evidence of low-atmospheric small-scale energy release and possible relationship to the onset of the main flare.We study the 22 June 2015 M6.5 flare (SOL2015-06-22T18:23) using Hα (line-center and red-wing) images and photospheric vector magnetograms obtained by the recently commissioned 1.6 m New Solar Telescope (NST) 21, 22 at Big Bear Solar Observatory (BBSO), which is stabilized by a high-order adaptive optics (AO) system (see Methods). In particular, the vector field data is taken by the Near InfraRed Imaging Spectropolarimeter (NIRIS) 23 at the 1.56µ Fe I line. These observations have the highest spatial resolution ever achieved for the solar observations (∼70 km for Hα and ∼170 km for vector field) and rapid cadence (28 s for Hα and 87 s for vector field). Also used are flare microwave spectra and time profiles from the new Expanded Owens Valley Solar Array (EOVSA; see Methods), and time profiles of hard X-ray (HXR) and soft X-ray (SXR) fluxes from the Reuven Ramaty High Energy Solar Spectroscopic Imager (RHESSI) 24 and the Geostationary Operational Environmental Satellite (GOES)-15, respectively. Ancillary data of full-disk corona images and magnetograms from the Solar Dynamics Observatory (SDO) 25 are additionally used. The long-duration 22 June 2015 M6.5 flare occurred near the disk center (8• W, 12• N) at NOAA active region (AR) 12371. Time profiles of flare emissions in different wavelengths (including HXR, SXR, and microwave) clearly display that soon before the flare impulsive phase starting from ∼17:51 UT, there are two short ep...