Offshore wind power is a renewable energy of growing relevance in current electric energy systems, presenting favorable wind conditions in comparison with the sites on land. However, the higher energy yield has to compensate the increment in installation and maintenance costs, thus the importance of optimizing resources. One relevant aspect to increase profitability is the wind farm layout. The aim of this paper is to propose a new method to maximize the expected power production of offshore wind farms by setting the appropriate layout, i.e. minimizing the wake effects. The method uses a sequential procedure for global optimization consisting of two steps: i) an heuristic method to set an initial random layout configuration, and ii) the use of nonlinear mathematical programming techniques for local optimization, which use the random layout as an initial solution. The method takes full advantage of the most up-to-date mathematical programming techniques while performing a global optimization approach, which can be easily parallelized. The performance of the proposed procedure is tested using the German offshore wind farm Alpha Ventus, located in the North Sea, yielding an increment of expected annual power production of 3.52% with respect to the actual configuration. According to current electricity prices in Germany, this constitutes an expected profit increment of almost 1 M€ per year.