The accuracy of short-term electricity load forecasting is of great interest since it allows avoiding unexpected blackouts and lowering operating costs. In this paper, we aim to implement the artificial neural networks to model and forecast the half-hourly electric load demand in Tunisia over the period 2000–2008. To improve the quality of forecasts, the proposed artificial neural network model uses not only past electric load values as inputs, but also climatic and calendar variables. To determine the optimal structure of the neural network model, this paper employs the pattern search algorithm. Moreover, the neural network model is equipped with the Levenberg–Marquardt learning algorithm. Our findings confirm the performance of this algorithm to the view of evaluation indicators since the mean absolute percentage error values range between 1.1 and 3.4%. The analysis also shows the superiority of the Levenberg–Marquardt algorithm compared to the resilient back propagation algorithm and the conjugate gradient algorithm. In the light of the current research, we stress the aptness of the proposed artificial neural network model in forecasting short-term electricity demand.