The present work investigates the normal and tangential peeling behaviour of a gecko spatula using a coupled adhesion-friction model. The objective is to explain the strong attachment and easy detachment behaviour of the spatulae as well as to understand the principles behind their optimum design. Using nonlinear finite element computations, it is shown that during tangentially-constrained peeling the partial sliding of the spatula pad near the peeling front stretches the spatula, thus increasing the strain energy and leading to high pull-off forces. The model is used to investigate the influence of various parameters on the pull-off forces -- such as the peeling angle, spatula shaft angle, strip thickness, and material stiffness. The model shows that increasing the spatula pad thickness beyond a certain level does not lead to a significant increase in the attachment forces. Further, the easy detachment behaviour of geckos is studied under tangentially-free peeling conditions. It is found that the spatulae readily detach from the substrate by changing their shaft angle and eventually peel vertically like a tape. Since the present computational model is not limited by the geometrical, kinematical, and material restrictions of theoretical models, it can be employed to analyse similar biological adhesive systems.