Autonomous mobile robots navigating through human crowds are required to foresee the future trajectories of surrounding pedestrians and accordingly plan safe paths to avoid any possible collision. This paper presents a novel approach for pedestrian trajectory prediction. In particular, we developed a new method based on an encoder–decoder framework using bidirectional recurrent neural networks (BiRNN). The difficulty of incorporating social interactions into the model has been addressed thanks to the special structure of BiRNN enhanced by the attention mechanism, a proximity-independent model of the relative importance of each pedestrian. The main difference between our and the previous approaches is that BiRNN allows us to employs information on the future state of the pedestrians. We tested the performance of our method on several public datasets. The proposed model outperforms the current state-of-the-art approaches on most of these datasets. Furthermore, we analyze the resulting predicted trajectories and the learned attention scores to prove the advantages of BiRRNs on recognizing social interactions.