Various techniques for facilitating selection of a pacing vector for pacing a chamber of a heart are described. One example method described includes, for each of a plurality of vectors, delivering a pacing pulse to capture a first heart chamber, determining a first time interval between the pacing pulse and a sensed event in a second heart chamber, determining a capture detection window in response to the determined first time interval, and enabling a capture detection module to iteratively decrease a pacing pulse magnitude delivered in the first heart chamber until an event in the second heart chamber is not sensed during the determined capture detection window.