The two clubs were seen as in continued talks this week over a proposed deal for the 27-year-old, who had also previously been linked with Barcelona and several clubs from the Premier League.
The German champions then made public that the deal was done on Tuesday afternoon:
The Moroccan, capped 31 times by his country, became unsettled, however, publicly accusing the Italian club of breaking promises regarding a salary increase.
Bayern were looking to strengthen their defence after holding midfielder Javi Martinez suffered a serious knee injury in their Super Cup defeat by Borussia Dortmund this month.
Roma, meanwhile, will replace Benatia with Kostas Manolas who has already had his medical.
The Greece international is seen as closing in on a €13m transfer to the Giallorossi, after an agreement with Olympiacos was reached.
Manolas’ arrival should be completed in time for him to be registered to feature against Fiorentina at the weekend.
VIEW FROM GERMANY - Daniel Rathjen, Eurosport Germany
We are still sceptical in Munich. 30 million euros for a largely unknown player? Benatia may have his qualities, but the pressure and expectation will be greater at Bayern than in Serie A.
Due to this high sum he must fit in immediately and cannot afford to make any mistakes. He needs to replace Javi Martinez which, in itself, is a big challenge.
Currently there are still too many unanswered questions to evaluate the transfer. Will Pep Guardiola continue to play with three defenders and will Benatia be the new leader in this backline?
Or will Benatia be a "regular" centre-half in a back four? The answers can only be provided by Benatia himself. It will be exciting but uncertain.
VIEW FROM ITALY - Mattia Fontana, Eurosport Italy
Benatia was always considered a good prospect when he was at Udinese, probably one of the best centre-backs in our league. But nobody expected he would play like he did in Rome, where he was simply outstanding.
He played in a back three in Udine and was good, but when he played in a four-man defence in Rome he became the best centre-back in Serie A (he was voted as much by our users last year).
He is very strong physically, explosive, but also technically gifted. I don’t think he would be a perfect replacement for Javi Martinez in a back three as he is not suited to the central position, but either side in a back three and he would be just perfect – that's where he played in Udine.
He is a stronger version of Jerome Boateng. He has the same pace but is much more reliable.
We think it’s a great swoop for Bayern. 26+4m euros is not that much, especially if you consider Manchester City paid 40m for Mangala.
- Sports & Recreation
- Javi Martinez