The response of laterally loaded piles installed near the crest of clay slopes is analysed. Three-dimensional finite element analyses are presented for piles at various distances from a slope crest and for different pile shape. The results of these analyses are used to study the variation of the pile displacement, the bending moment of the pile and the soil resistance in relation to pile to slope distance and pile shape. The obtained results show that the proximity of slope significantly affects the lateral load capacity of the piles but not significantly when the piles are placed at 7D (where D is pile diameter) or greater from the slope crest. Furthermore, the lateral soil resistance on the ground surface for circular piles is larger than that for rectangular piles at the same lateral load in level ground. The decrease rate of lateral soil resistance on the ground surface for circular piles gets faster as the slope ratio and load level increase.