Optimization has been one of significant research fields in the past few decades, most of the real-world problems are multimodal optimization problems. The prime target of multimodal optimization is to find multiple global and local optima of a problem in one single run. The multimodal optimization problems have drawn attention to evolutionary algorithms. Firefly algorithm is a recently proposed stochastic optimization technique. This algorithm is a global search algorithm. On the other hand, because this algorithm has multimodal characteristics, it has the capacity and capability to change into multimodal optimization method. The aim of this article is to show that firefly algorithm is able to find multiple solutions in multimodal problems. Therefore, in this study, a new technique, is introduced for multimodal optimization. In the proposed algorithm, the multimodal optima are detected through separately evolving sub-populations. A stability criterion is used to determine the stability and instability of the sub-population. If a sub-population is regarded as stable, it has an optima stored in an external memory called Archive. After some iterations, the archive includes all of the optimums. The proposed algorithm utilizes a simulated annealing local optimization algorithm to increase search power, accuracy and speed of the algorithm. The proposed algorithm is tested on a set of criterion functions. The results show that the proposed algorithm has a high ability to find the multimodal optimal points.