A peristaltic pump (1) for pumping a liquid comprises a flexible tube (2) for guiding the liquid to be pumped, a compression means (5) being actuatable for compressing the flexible tube (2), an upstream valve means (3) arranged in an upstream direction with respect to the compression means (5) and being actuatable to selectively open or close the flexible tube (2) upstream of the compression means (5), and a downstream valve means (4) arranged in a downstream direction with respect to the compression means (5) and being actuatable to selectively open or close the flexible tube (2) downstream of the compression means (5). A drive shaft (6) is provided which is rotatable for periodically actuating the compression means (5), the upstream valve means (3) and the downstream valve means (4). In addition, the peristaltic pump comprises a position detection means (8) for detecting the rotational position of the drive shaft (6) during actuation of the compression means (5), the upstream valve means (3) and the downstream valve means (4), a pressure sensor (7) being arranged between the upstream valve means (3) and the downstream valve means (4) for measuring a pressure signal (P) in the flexible tube (2) at a location between the upstream valve means (3) and the downstream valve means (4), and a control means (9) to control the operation of the peristaltic pump (1), the control means (9) being operative to detect a fault condition during the operation of the peristaltic pump (1) from a measured pressure signal (P). In a peristaltic pump (1) of this kind the control means (9), for detecting the fault condition, is operative to detect a peak (P1, P1′) of the pressure signal (P) in a predefined interval (II) during rotation of the drive shaft (6) and to determine whether the fault condition is present or not by taking the signal value at the peak (P1, P1′) and the location (T1, T1′) of the peak (P1, P1′) in the predefined interval (II) into account. In this way a peristaltic pu