A compound of Formula: where: Z 1 and Z 2 are independently C (when R 2 or R 3 is attached thereto), CH, or N; alk is alkylene wherein one or two carbon atoms of the alkylene chain are optionally replaced by NR, O, S, or SO 2 (where R is hydrogen or alkyl), and the alkylene chain is optionally substituted with one or two substituents independently selected from halo, haloalkyl, haloalkoxy, hydroxy, and alkoxy, and wherein -alk-R 1 is attached to carbon (a) or (b); wherein alk in -(alk)-R 1 is -(CH 2) 2 - ∗, -(CH 2) 3 - ∗, -(CH 2) 4 - ∗,-CH 2 CH(CH 3)CH 2 - ∗, ∗ -CH 2 CH(CH 3)CH 2 -, -O-(CH 2)- ∗, -O-(CH 2) 2 - ∗, -O-(CH 2) 3 - ∗,-OCH 2 CH CH 2 - ∗, -OCH 2 CH(OCH 3)CH 2 - ∗, or -OCH 2 CH(OCF 3)CH 2 - ∗, wherein the ∗ indicates the point of attachment to -R 1; R 1 is -NR 6 R 7 (where R 6 and R 7 are independently hydrogen, alkyl, hydroxyalkyl, alkoxyalkyl, haloalkyl, or haloalkoxyalkyl), unsubstituted heterocyclyl, heterocyclyl substituted with 1, 2, or 3 of R a, R b, and R c wherein R a, R b, and R c are independently selected from alkyl, hydroxy, alkoxy, halo, haloalkyl, alkylcarbonyl, and haloalkylcarbonyl, or spiroheterocycloamino wherein a nitrogen atom of the spiroheterocycloamino is attached to alk; R 2 is hydrogen, alkyl, cycloalkyl, halo, hydroxy, alkoxy, haloalkoxy, or cyano; R 3 is hydrogen, alkyl, halo, alkoxy, alkylamino, dialkylamino, or cyano; R 4 is alkyl (optionally substituted with one to nine deuteriums), or NR e R f (where R e is hydrogen or alkyl, and R f is hydrogen, alkyl, deuterated alkyl, alkylthioalkyl, acyl, haloalkyl, hydroxyalkyl, alkoxyalkyl, aminoalkyl, cyanoalkyl, carboxyalkyl, alkoxycarbonylalkyl, cycloalkyl, cycloalkylalkyl, aryl, aralkyl, heteroaryl, heteroaralkyl, heterocyclyl, or heterocyclylalkyl), wherein the cycloalkyl, the aryl, the heteroaryl, and the heterocyclyl either alone or as part of the cycloalkylalkyl, the aralkyl, the heteroaralkyl and the heterocyclylalkyl in R f is unsubstituted or substituted with 1, 2, or 3 of R g, R h, and R i wherein R g, R h, and R i are independently selected from alkyl, hydroxy, alkoxy, halo, haloalkyl, cyano, carboxy, alkoxycarbonyl, and haloalkoxy, and wherein the alkylene of the aralkyl, the heteroaralkyl, the heterocyclylalkyl, and the cycloalkylalkyl in R f is optionally substituted with one to nine deuteriums; X is carbon or nitrogen; and ring B is phenyl, 5- or 6-membered cycloalkyl, spirocycloalkyl, spiroheterocycloamino, or 5-, 6-, or 7-membered saturated heterocyclyl, wherein each of the ring(s) of ring B is unsubstituted or substituted with 1, 2, 3, or 4 of R j, R k, R l, and R m wherein R i, R k, R l, and R m are independently selected from alkyl, hydroxy, alkoxy, halo, haloalkyl, and haloalkoxy; or a pharmaceutically acceptable salt thereof. Z 1 and Z 2 are independently C (when R 2 or R 3 is attached thereto), CH, or N; alk is alkylene wherein one or two carbon atoms of the alkylene chain are optionally replaced by NR, O, S, or SO 2 (where R is hydrogen or alkyl), and the alkylene chain is optionally substituted with one or two substituents independently selected from halo, haloalkyl, haloalkoxy, hydroxy, and alkoxy, and wherein -alk-R 1 is attached to carbon (a) or (b); wherein alk in -(alk)-R 1 is -(CH 2) 2 - ∗, -(CH 2) 3 - ∗, -(CH 2) 4 - ∗,-CH 2 CH(CH 3)CH 2 - ∗, ∗ -CH 2 CH(CH 3)CH 2 -, -O-(CH 2)- ∗, -O-(CH 2) 2 - ∗, -O-(CH 2) 3 - ∗,-OCH 2 CH CH 2 - ∗, -OCH 2 CH(OCH 3)CH 2 - ∗, or -OCH 2 CH(OCF 3)CH 2 - ∗, wherein the ∗ indicates the point of attachment to -R 1; R 1 is -NR 6 R 7 (where R 6 and R 7 are independently hydrogen, alkyl, hydroxyalkyl, alkoxyalkyl, haloalkyl, or haloalkoxyalkyl), unsubstituted heterocyclyl, heterocyclyl substituted with 1, 2, or 3 of R a, R b, and R c wherein R a, R b, and R c are independently selected from alkyl, hydroxy, alkoxy, halo, haloalkyl, alkylcarbonyl, and haloalkylcarbonyl, or spiroheterocycloamino wherein a nitrogen atom of the spiroheterocycloamino is attached to alk; R 2 is hydrogen, alkyl, cycloalkyl, halo, hydroxy, alkoxy, haloalkoxy, or cyano; R 3 is hydrogen, alkyl, halo, alkoxy, alkylamino, dialkylamino, or cyano; R 4 is alkyl (optionally substituted with one to nine deuteriums), or NR e R f (where R e is hydrogen or alkyl, and R f is hydrogen, alkyl, deuterated alkyl, alkylthioalkyl, acyl, haloalkyl, hydroxyalkyl, alkoxyalkyl, aminoalkyl, cyanoalkyl, carboxyalkyl, alkoxycarbonylalkyl, cycloalkyl, cycloalkylalkyl, aryl, aralkyl, heteroaryl, heteroaralkyl, heterocyclyl, or heterocyclylalkyl), wherein the cycloalkyl, the aryl, the heteroaryl, and the heterocyclyl either alone or as part of the cycloalkylalkyl, the aralkyl, the heteroaralkyl and the heterocyclylalkyl in R f is unsubstituted or substituted with 1, 2, or 3 of R g, R h, and R i wherein R g, R h, and R i are independently selected from alkyl, hydroxy, alkoxy, halo, haloalkyl, cyano, carboxy, alkoxycarbonyl, and haloalkoxy, and wherein the alkylene of the aralkyl, the heteroaralkyl, the heterocyclylalkyl, and the cycloalkylalkyl in R f is optionally substituted with one to nine deuteriums; X is carbon or nitrogen; and ring B is phenyl, 5- or 6-membered cycloalkyl, spirocycloalkyl, spiroheterocycloamino, or 5-, 6-, or 7-membered saturated heterocyclyl, wherein each of the ring(s) of ring B is unsubstituted or substituted with 1, 2, 3, or 4 of R j, R k, R l, and R m wherein R i, R k, R l, and R m are independently selected from alkyl, hydroxy, alkoxy, halo, haloalkyl, and haloalkoxy; or a pharmaceutically acceptable salt thereof.