Compounds of formula (I), wherein R1 to R8 A, B, Z1 and Z2 are as defined in the claims and pharmaceutically acceptable salts and esters thereof are disclosed. The compounds of formula (I) possess utility as androgen receptor antagonists (inhibitors) and/or cytochrome P450 monooxygenase 17a-hydroxylase/17,20-lyase (CYP17) inhibitors. The compounds are useful as medicaments in the treatment of cancer, particularly prostate cancer, and other androgen dependent conditions and diseases where androgen antagonism is desired.