Facility location of two producers with preference of customers is discussed in this paper. Because of differences between two producers in terms of their influence on the market, the problem is formulated as a bi-level integer mathematical programming model with binary variables. It is considered that both leader and follower have some facilities at first and are going to open new facilities and this may lead to make changes in allocation of facilities and customers. To solve the problem, two metaheuristics algorithm based on genetic algorithm (GA) and hybrid of genetic algorithm and ant colony optimization (ACO) are proposed. In the first section of each algorithm, the location of facilities for two producers is determined and in the second section, each customer selects a facility. Upper bound of the competitive facility location problem is determined by solving the upper-level problem as an integer linear programming model without considering the follower’s decision. To evaluate the efficiency of proposed algorithms, enumeration technique is used to find optimal solution. Computational results show that all of the developed algorithms are capable of achieving optimal solution for small size problems and high-quality solution in reasonable computational time for medium and large-scale problems.