In the course of negotiations with States applying for accession the Agency may provide technical assistance as regards the implementation of Community legislation in the field of maritime safety , maritime security , and prevention of pollution by ships .