Detection of precursors of strong earthquakes is a challenging research area. Recently, it has been shown that strong earthquakes affect electron distribution in the regional ionosphere with indirectly observable changes in the ionospheric delays of GPS signals. Especially, the total electron content (TEC) estimated from GPS data can be used in the seismic precursor detection for strong earthquakes. Although physical mechanisms are not well understood yet, GPS-based seismic precursors can be observed days prior to the occurrence of the earthquake. In this study, a novel machine learning-based technique, EQ-PD, is proposed for detection of earthquake precursors in near real time based on GPS-TEC data along with daily geomagnetic indices. The proposed EQ-PD technique utilizes support vector machine (SVM) classifier to decide whether an observed spatiotemporal anomaly is related to an earthquake precursor or not. The data fed to the classifier are composed of spatiotemporal variability map of a region. Performance of the EQ-PD technique is demonstrated in a case study over a region covering Italy in between the dates of 1 January 2014 and 30 September 2016. The data are partitioned into three nonoverlapping time periods, that are used for training, validation, and test of detecting precursors of earthquakes with magnitudes above 4 in Richter scale. The EQ-PD technique is able to detect precursors in 17 out of 21 earthquakes while generating 7 false alarms during the validation period of 266 days and 22 out of 24 earthquakes while generating 13 false alarms during the test period of 282 days.