A compound of formula wherein W 1 denotes N and W 2 denotes CR 8, or W 2 denotes N and W 1 denotes CR 8, R 1 denotes -(CY 2) n -E-(CY 2) n -Het 3, -(CY 2) n -Cyc-Het 3, -(CY 2) n -NY-Het 3, -(CY 2) n -CONH-Het 3, -(CY 2) n -NHCO-Het 3, -(CY 2) n -C -(CY 2) n -Het 3, -(CY 2) n -Het 1,-(CY 2) n -CONH-Het 1, -(CY 2) n -NHCO-Het 1, - n-Ar, -Cyc-Ar, - n-NY-Ar, - n-CONH-Ar, - n-NHCO-Ar, - n-C - n-Ar, -(CY 2) n -Cyc, - n-NY-Cyc, - n-CONH-Cyc, - n-NHCO-Cyc, - n-NHCO-NH-Cyc, Y, -(CYR 8) n -OY, - n-COOY, - n-SO2Y, -(CYR 8),-Co-,-N(R 8) 2, -(CY 2) n -[C] m -(CYR 8) n -NY 2, [-(CY 2) n -O] m -(CYR 8) n -NYCOY, -(CY 2) n -NYCOOY, -(CY 2) n -NYSO 2 Y, -(CY 2),-NYCON(R 8) 2, -(CY 2)n-NHCO-CH=CH 2, -(CY 2) n -NHCO-NH-(CY 2) n =CH 2 or-(CY 2) n -CN; R 2 denotes Y; or R 1, R 2 together denote -(CY 2) p -NH-(CY 2) p -, -(CY 2) p -NHCO-(CY 2) p -, -(CY 2) p -CONH-(CY 2) p -, -(CY 2) p -N -(CY 2) p -, -(CY 2) p -N(COOA)-(CY 2) p -, -(CY 2) p -C (Het 3)-(CY 2) p -, R 3 denotes -(CY 2) n -Het 1, -(CY 2) n -Het 3, -(CY 2) n -Ar, -C -Ar, Y or -(CY 2) n -Cyc; R 4 denotes Y, COY or SO 2 Y; R 5 denotes E-Ar, NY-Ar, Cyc, Y, OY, NYY, NYCOOY, NYCOY, COY, COOY, SO 2 Y, Het 1 or Het 3; R 6, R 7 together denote -(CY 2) p -; R 8 denotes Y or Ar; X is CO; E is -(CY 2) m -, O, CO, -COO- or SO 2; Y denotes H or A; A denotes unbranched or branched alkyl having 1-10 C atoms, in which 1-7 H atoms can be replaced independently from one another by Hal, =O and/or OH; Cyc denotes cycloalkyl having 3-7 C atoms, in which 1-4 H atoms can be replaced independently from one another by Hal and/or OH; Ar denotes an unsaturated or aromatic mono- or bicyclic carbocycle having 3-10 C atoms, which can be substituted by at least one substituent selected from the group of A, Hal, -(CY 2) n -OY, COOY, CONH 2, NHCOY, -(CY 2) n -NYCOOY, -(CY 2) n -NY 2, NO 2, SO 2 Y, SO 2 NY 2, NYSO 2 Y, -(CY 2) n -CN, -(CY 2) n -Het 2 and Cyc, or which can be fused to Cyc; Het 1 denotes an unsaturated or aromatic mono- or bicyclic heterocycle having 1-10 C atoms and 1-4 N, O and/or S atoms, which can be substituted by at least one substituent selected from the group of Hal, A, Cyc, OY, =O, COOY, CONH 2, NHCOY, -(CY 2) n -NY 2, SO 2 Y, SO 2 NY 2, NHSO 2 Y, CN, Ar and -(CY 2) n -Het 3; Het 2 denotes a saturated or unsaturated monocyclic 5- or 6-membered heterocycle having 1-4 C atoms and 1-4 N, O and/or S atoms, which can be substituted by A and/or =O; Het 3 denotes a saturated mono- or bicyclic heterocycle having 3-7 C atoms and 1-4 N, O and/or S atoms, which can be substituted by at least one substituent selected from the group of =O, A, Hal, -(CY 2) n -Cyc, -(CY 2) n -OY, COY, COOY, CONY 2, NHCOY, -(CY 2) n -NY 2, CN, SO 2 Y and -(CY 2) n -Ar; Hal denotes F, Cl, Br or I; m, n each independently is 0, 1, 2, 3, 4, 5 or 6; and p denotes 2; or a physiologically acceptable salt thereof. W 1 denotes N and W 2 denotes CR 8, or W 2 denotes N and W 1 denotes CR 8, R 1 denotes -(CY 2) n -E-(CY 2) n -Het 3, -(CY 2) n -Cyc-Het 3, -(CY 2) n -NY-Het 3, -(CY 2) n -CONH-Het 3, -(CY 2) n -NHCO-Het 3, -(CY 2) n -C -(CY 2) n -Het 3, -(CY 2) n -Het 1,-(CY 2) n -CONH-Het 1, -(CY 2) n -NHCO-Het 1, - n-Ar, -Cyc-Ar, - n-NY-Ar, - n-CONH-Ar, - n-NHCO-Ar, - n-C - n-Ar, -(CY 2) n -Cyc, - n-NY-Cyc, - n-CONH-Cyc, - n-NHCO-Cyc, - n-NHCO-NH-Cyc, Y, -(CYR 8) n -OY, - n-COOY, - n-SO2Y, -(CYR 8),-Co-,-N(R 8) 2, -(CY 2) n -[C] m -(CYR 8) n -NY 2, [-(CY 2) n -O] m -(CYR 8) n -NYCOY, -(CY 2) n -NYCOOY, -(CY 2) n -NYSO 2 Y, -(CY 2),-NYCON(R 8) 2, -(CY 2)n-NHCO-CH=CH 2, -(CY 2) n -NHCO-NH-(CY 2) n =CH 2 or-(CY 2) n -CN; R 2 denotes Y; or R 1, R 2 together denote -(CY 2) p -NH-(CY 2) p -, -(CY 2) p -NHCO-(CY 2) p -, -(CY 2) p -CONH-(CY 2) p -, -(CY 2) p -N -(CY 2) p -, -(CY 2) p -N(COOA)-(CY 2) p -, -(CY 2) p -C (Het 3)-(CY 2) p -, R 3 denotes -(CY 2) n -Het 1, -(CY 2) n -Het 3, -(CY 2) n -Ar, -C -Ar, Y or -(CY 2) n -Cyc; R 4 denotes Y, COY or SO 2 Y; R 5 denotes E-Ar, NY-Ar, Cyc, Y, OY, NYY, NYCOOY, NYCOY, COY, COOY, SO 2 Y, Het 1 or Het 3; R 6, R 7 together denote -(CY 2) p -; R 8 denotes Y or Ar; X is CO; E is -(CY 2) m -, O, CO, -COO- or SO 2; Y denotes H or A; A denotes unbranched or branched alkyl having 1-10 C atoms, in which 1-7 H atoms can be replaced independently from one another by Hal, =O and/or OH; Cyc denotes cycloalkyl having 3-7 C atoms, in which 1-4 H atoms can be replaced independently from one another by Hal and/or OH; Ar denotes an unsaturated or aromatic mono- or bicyclic carbocycle having 3-10 C atoms, which can be substituted by at least one substituent selected from the group of A, Hal, -(CY 2) n -OY, COOY, CONH 2, NHCOY, -(CY 2) n -NYCOOY, -(CY 2) n -NY 2, NO 2, SO 2 Y, SO 2 NY 2, NYSO 2 Y, -(CY 2) n -CN, -(CY 2) n -Het 2 and Cyc, or which can be fused to Cyc; Het 1 denotes an unsaturated or aromatic mono- or bicyclic heterocycle having 1-10 C atoms and 1-4 N, O and/or S atoms, which can be substituted by at least one substituent selected from the group of Hal, A, Cyc, OY, =O, COOY, CONH 2, NHCOY, -(CY 2) n -NY 2, SO 2 Y, SO 2 NY 2, NHSO 2 Y, CN, Ar and -(CY 2) n -Het 3; Het 2 denotes a saturated or unsaturated monocyclic 5- or 6-membered heterocycle having 1-4 C atoms and 1-4 N, O and/or S atoms, which can be substituted by A and/or =O; Het 3 denotes a saturated mono- or bicyclic heterocycle having 3-7 C atoms and 1-4 N, O and/or S atoms, which can be substituted by at least one substituent selected from the group of =O, A, Hal, -(CY 2) n -Cyc, -(CY 2) n -OY, COY, COOY, CONY 2, NHCOY, -(CY 2) n -NY 2, CN, SO 2 Y and -(CY 2) n -Ar; Hal denotes F, Cl, Br or I; m, n each independently is 0, 1, 2, 3, 4, 5 or 6; and p denotes 2;