This application relates to a compound of formula I (or a pharmaceutically acceptable salt thereof) as defined herein, pharmaceutical compositions thereof, and its use as an inhibitor of factor Xa, as well as a process for its preparation and intermediates therefor.