Toothed whales use sonar to detect, locate, and track prey. They adjust emitted sound intensity, auditory sensitivity and click rate to target range, and terminate prey pursuits with high-repetition-rate, low-intensity buzzes. However, their narrow acoustic field of view (FOV) is considered stable throughout target approach, which could facilitate prey escape at close-range. Here we show that, like some bats, harbour porpoises can broaden their biosonar beam during the terminal phase of attack but, unlike bats, maintain the ability to change beamwidth within this phase. Based on video, MRI, and acoustic-tag recordings, we propose this flexibility is modulated by the melon and implemented to accommodate dynamic spatial relationships with prey and acoustic complexity of surroundings. Despite independent evolution and different means of sound generation and transmission, whales and bats adaptively change their FOV, suggesting that beamwidth flexibility has been an important driver in the evolution of echolocation for prey tracking.