This paper presents a new optimization algorithm based on human society's intelligent contests. FIFA World Cup is an international association football competition competed by the senior men's national teams. This contest is one of the most significant competitions among the humans in which people/teams try hard to overcome the others to earn the victory. In this competition there is only one winner which has the best position rather than the others. This paper introduces a new technique for optimization of mathematic functions based on FIFA World Cup competitions. The main difficulty of the optimization problems is that each type of them can be interpreted in a specific manner. World Cup Optimization (WCO) algorithm has a number of parameters to solve any type of problems due to defined parameters. For analyzing the system performance, it is applied on some benchmark functions. It is also applied on an optimal control problem as a practical case study to find the optimal parameters of PID controller with considering to the nominal operating points , changes of the AVR system. The main objective of the proposed system is to minimize the steady-state error and also to improve the transient response of the AVR system by optimal PID controller. Optimal values of the PID controller which are achieved by WCO algorithm are then compared with particle swarm optimization and imperialist competitive algorithm in different situations. Finally for illustrating the system capability against the disturbance, it is applied on a generator with disturbance on it and the results are compared by the other algorithms. The simulation results show the excellence of WCO algorithm performance into the nature base and other competitive algorithms.