© 2017 The Author(s). We study the local variation of the geomagnetic field measured by the Huancayo Geomagnetic Observatory, Peru, during 2001-2010. Initially, we sought to relate the SFI values, stored daily in the NOAA's National Geophys- ical Data Center, with the corresponding geomagnetic index; however, no rela- tion was observed. Nonetheless, subsequently, a comparison between the monthly geomagnetic-activity index and the monthly SFI average allowed observing a tem- poral correlation between these average indices. This correlation shows that the effect of the solar flares does not simultaneously appear on the corresponding magnetic indices. To investigate this, we selected the most intense X-class flares; then, we checked the magnetic field disturbances observed in the Huancayo Geomagnetic Observatory magnetograms. We found some disturbances of the local geomagnetic field in the second and third day after the corresponding solar flare; however, the disturbance strength of the local geomagnetic field is not correlated with the X-class of the solar flare. Finally, there are some disturbances of the local geomagnetic field that are simultaneous with the X-class solar flares and they show a correlation with the total flux of the solar flare.