Bayern Munich announced on Monday that striker Mario Gomez will join Italian side Fiorentina.
Champions League winners Bayern said an agreement had been reached "in principle" for the 27-year-old, who found his place in the Bavarian team taken by Mario Manduzkic last season.
The two clubs had been negotiating over the transfer for some time, with Bayern saying last week the deal was dead as the Florentine club were reportedly unwilling to meet the German double winners' 20 million euro ($25.7 million) asking price.
Bayern's communications director Markus Horwick said a contract until 2017 should be signed "in the next one to two weeks." Gomez is expected to earn around four million euros a season.
Italian newspaper Gazzetta dello Sport claim the transfer will cost Fiorentina 15 million euros.
Gomez was under contract in Munich until 2016 but was known to have become frustrated at having to play second fiddle to Mandzukic last season.
He was eager to orchestrate a move abroad in order to get more first team football, especially with the World Cup only a year away.
Despite being benched for most of the campaign, he still managed 19 goals last season, including two in the German Cup final.
Known as "Super Mario" after the computer game character, Gomez joined Bayern in 2009 from Stuttgart for 35 million euros.
He has scored 25 goals for Germany in 58 appearances.