"For this reason it was a logical step to extend his contract which we did today."
Boateng had a below-par performance in Bayern's 3-2 defeat at home to Manchester City on Tuesday, their first home defeat since March, but they still finished winners of their Champions League group to reach the last 16.
Having joined in July 2011, Boateng helped Bayern win last season's Champions League title as the Bavarian giants became the first German side to win the treble of European, league and cup titles.
"I am happy, Bayern is one of the biggest clubs in the world and it's a lot of fun and an honour to play for them," said Boateng, who has made 36 appearances for Germany.
"I want to win more things with this team in the coming years."