Disclosed are imidazole and thiazole compounds, as well aspharmaceutical compositions and methods of use thereof. One embodiment isa compound having the structure Formula (I) and pharmaceutically acceptablesalts, prodrugs and N-oxides thereof (and solvates and hydrates thereof),wherein X, A, Z, R1 and R' are as described herein. In certain embodiments, acompound disclosed herein inhibits TGF-.beta., and can be used to treatdiseaseby blocking TGF-.beta. signaling.