Pep Guardiola said his 21st title as a coach was not a bad way to sign off at Bayern Munich after a tearful farewell in the German Cup final.

Bayern won Guardiola's final game in charge on Saturday night at Berlin's Olympic Stadium by beating Borussia Dortmund 4-3 on penalties after neither side could score in 120 minutes.

Dortmund missed two penalties in the shootout before Douglas Costa nailed the final spot kick to seal Bayern's league and cup double and give Guardiola his 21st title.

'21 titles in seven years, three titles per year, that's not bad,' said Guardiola who won 14 titles in four years with Barcelona.

'But I had some luck in being able to coach Barcelona and Bayern Munich, both clubs are exceptional.

'They have players who help you do your best, but my time here in Germany hasn't just been about titles: it was also my life here, the Bundesliga and the stadiums which were always full.'

Guardiola will coach Manchester City next season, but the Spaniard, so often accused of being too emotionless during his time in Munich, broke down in tears as Bayern celebrated.

He revealed that he has struggled to deal with criticism from the German media since it was announced at the start of the year that he would leave to coach City next season.

'The last five months haven't been easy,' he said.

'What people said to me, before I decided to join Manchester, was completely different to what they said after it was announced.

'I can't understand that.'