The Sun sporadically produces eruptive events leading to intense fluxes of solar energetic particles (SEPs) that dramatically disrupt the near-Earth radiation environment. Such events are directly studied for the last decades but little is known about the occurrence and magnitude of rare, extreme SEP events. Presently, a few events that produced measurable signals in cosmogenic radionuclides such as 14C, 10Be and 36Cl have been found. Analyzing annual 14C concentrations in tree-rings from Switzerland, Germany, Ireland, Russia, and the USA we discovered two spikes in atmospheric 14C corresponding to 7176 and 5259 BCE. The ~ 2% increases of atmospheric 14C recorded for both events exceed all previously known 14C peaks but after correction for the geomagnetic field, they are comparable to the largest event of this type discovered so far at 775 CE. These strong events serve as accurate time markers for the synchronization with floating tree-ring and ice core records and provide critical information on the previous occurrence of extreme solar events which threaten modern infrastructure.