Recent neurophysiological experimental results suggest that the prefrontal cortex plays an important role in filtering out unattended visual inputs. Here we propose a neurodynamical computational model of a part of the prefrontal cortex to account for the neural mechanisms defining this attentional filtering effect. Similar models have been employed to explain experimental results obtained during the performance of attention and working memory tasks. In this previous work the principle of biased competition was shown to successfully account for the experimental data. To model the attentional filtering effect, the biased competition model was extended to enable cooperation between stimulus selective neurons. We show that, in a biological relevant minimal model, competition and cooperation between the neurons are sufficient conditions for reproducing the attentional effect. Furthermore, a characterization of the parameter regime where the cooperation effect is observed is presented. Finally, we also reveal parameter regimes where the network has different modes of operation: selective working memory, attentional filtering, pure competition and noncompetitive amplification.