In some examples, controlling delivery of CRT includes controlling an implantable medical device to deliver ventricular pacing according to a sequence of different values of a CRT parameter, and acquiring first and second electrograms from respective first and second electrode vectors. For each value of the CRT parameter, a value of a metric of comparison of a first activation interval between occurrences of a first fiducial of a cardiac cycle and a second fiducial of the cardiac cycle detected in the first electrogram to a second activation interval between occurrences of the first fiducial and the second fiducial detected in the second electrogram may be determined. A target value of the metric of comparison may be identified and an updated value of the CRT parameter determined based on the target value. The system then may control the IMD to deliver ventricular pacing at the updated value of the CRT parameter.