A method is presented for automatic analysis of the P-wave, based on lead II of a 12-lead standard ECG, in resting conditions during a routine examination for the detection of patients prone to atrial fibrillation (AF), one of the most prevalent arrhythmias. First, the P-wave was delineated, and this was achieved in two steps: the detection of the QRS complexes for ECG segmentation, using a wavelet analysis method, and a hidden Markov model to represent one beat of the signal for P-wave isolation. Then, a set of parameters to detect patients prone to AF was calculated from the P-wave. The detection efficiency was validated on an ECG database of 145 patients, including a control group of 63 people and a study group of 82 patients with documented AF. A discriminant analysis was applied, and the results obtained showed a specificity and a sensitivity between 65% and 70%.