The deep near–infrared luminosity function of AC 118 , a cluster of galaxies at z = 0.3 , is presented . AC 118 is a bimodal cluster , as evidenced both by our near–infrared images of lensed galaxies , by public X–ray Rosat images and by the spatial distribution of bright galaxies . Taking advantage of the extension and depth of our data , which sample an almost unexplored region in the depth vs. observed area diagram , we derive the luminosity function ( LF ) , down to the dwarf regime ( M ^ { * } +5 ) , computed in several cluster portions . The overall LF , computed on a 2.66 Mpc ^ { 2 } areas ( H _ { 0 } = 50 km s ^ { -1 } Mpc ^ { -1 } ) , has an intermediate slope ( \alpha = -1.2 ) . However , the LF parameters depend on the surveyed cluster region : the central concentration has 2.6 ^ { +5.1 } _ { -1.7 } times more bright galaxies and 5.3 ^ { +7.2 } _ { -2.3 } times less dwarfs per typical galaxy than the outer region , which includes galaxies at an average projected distance of \sim 580 kpc ( errors are quoted at the 99.9 % confidence level ) . The LF in the secondary AC 118 clump is intermediate between the central and outer one . In other words , the near–infrared AC 118 LF steepens going from high to low density regions . At an average clustercentric distance of \sim 580 kpc , the AC 118 LF is statistically indistinguishable from the LF of field galaxies at similar redshift , thus suggesting that the hostile cluster environment plays a minor role in shaping the LF at large clustercentric distances , while it strongly affects the LF at higher galaxy density .