* Tie-up would create market leader in wind power

* Would boost Siemens' position in onshore market

(Adds background on wind turbine market players)

MADRID/FRANKFURT, June 17 (Reuters) - Spain's Gamesa and Germany's Siemens plan to combine their wind businesses to create the world's biggest builder of wind farms as Siemens seeks to bolster its weak position in the onshore market.

A Siemens-Gamesa joint venture would overtake Denmark's Vestas to become the world's biggest wind farm manufacturer by market share, operating in the mature North American and European markets and fast-growing markets such as India, Mexico and Brazil.

Final details still need to be approved after agreement in principle was reached, the Spanish company said on Friday following the suspension earlier of trading in Gamesa by the Spanish stock market regulator.

Siemens is dominant in the offshore wind market but relatively weak onshore and has struggled to make wind power profitable.

Gamesa is strong in emerging markets, notably Latin America, where it expanded when the Spanish government cut subsidies to clean energy producers in 2013.

A Siemens-Gamesa deal would be the latest in a string of mergers in the wind industry. Having weathered years of overcapacity and losses, it is now thriving as demand for carbon-free electricity increases.

Gamesa and Siemens said in January they were discussing a possible wind merger but talks stalled because of concerns linked to an existing joint venture, Adwen, between Gamesa and France's state-owned energy company Areva .

(Reporting By Jes?s Aguado; Writing by Ludwig Burger; editing by Jose Elias Rodriguez and Keith Weir) ((jesus.aguado@thomsonreuters.com; +34 91 585 8339; Reuters Messaging: Reuters Messaging: jesus.aguado.reuters.com@reuters.net))