Method and apparatus for mechanical sex-sorting of mosquitoes by extracting a class of mosquitoes from unsorted mosquitoes comprises obtaining unsorted mosquitoes, obtaining images of individual mosquitoes in a stationary phase, electronically classifying the individuals from the images into male mosquitoes and/or female mosquitoes, and possibly also unclassified objects; obtaining co-ordinates of individuals of at least one of the male mosquito and female mosquito classifications, and using a robot arm to reach an individual identified by the obtained coordinates to store or remove the individuals, thereby to provide sex-sorted mosquitoes.