Substitute Mario Mandzukic scored twice as Bayern Munich beat Hertha Berlin 3-2 to extend their unbeaten run to 35 Bundesliga games.
Adrian Lopez gave Hertha an early lead, but Mandzukic scored four minutes after replacing the injured Arjen Robben and then put the Bundesliga leaders in front with another header early in the second half.
Mario Gotze had come on just before the Croatia striker when Toni Kroos also picked up an injury and the midfielder made the most of his chance by scoring a third Bayern goal at the Allianz Arena.
Hertha were dangerous going forward and Anis Ben-Hatira pulled a goal back, but Pep Guardiola's side were not to be denied as they maintained their 100 per cent home record this season.
The victory ensured the European champions are just one game away from equalling Hamburg's 30-year record of 36 Bundesliga games without defeat and they were also boosted by the return of Javi Martinez, who came off the bench to make his first apperance for two months following a knee injury.
Mandzukic and defender Diego Contento dropped to the bench as Thomas Muller and Jerome Boateng returned to the starting line-up after being rested and suspended respectively for the midweek UEFA Champions League win over Viktoria Plzen.
There were two changes to the visitors' starting line-up following their win over Borussia Monchengladbach, as midfielder Tolga Cigerci and defender Nico Schulz were handed starts by coach Jos Luhukay.
And Luhukay's charges stunned Bayern just three minutes in, when the unmarked Ramos rose to meet Per Ciljan Skjelbred's corner and planted a header into the bottom-right corner of Manuel Neuer's net.
Things almost went from bad to worse for the European champions five minutes later as Ben-Hatira's deft lob bounced down off the crossbar with Neuer beaten.
Bayern were struggling to get going until Gotze and Mandzukic replaced Kroos and Robben.
The Croatia striker took just four minutes to make his presence felt as he rose at the back post to head home Franck Ribery's free-kick.
Hertha continued to threaten and it needed a great challenge from Bastian Schweinsteiger to get across and ensure Cigerci's shot deflected over the bar.
Schweinsteiger then showed his class at the other end six minutes after the break as he delivered an inviting free-kick, which Mandzukic met with a downward header into the far corner from 10 yards.
Kraft should really have done better and was beaten again three minutes later. This time Gotze was in the right place to head Rafinha's cross into the far corner as the Hertha keeper scrambled across in vain.
But Hertha were not finished yet and they were back in it on 57 minutes when Ben-Hatira diverted Ramos' mis-hit shot into the roof of the net.
Ramos was a thorn in Bayern's side and his long-range strike was tipped over by Neuer. Ramos also thought he should have had a penalty for a push by Alaba in stoppage-time, but the referee waved play on and Bayern held on for another win.
|5||D. Van Buyten|
for T. Kroos 24'
for A. Robben 26'
for T. Müller 64'
|Jedinak raring to go|
|Agent: Borini set to stay Liverpool|
|Koeman: No bids for Lovren|
|Livermore: England hopes shouldn´t hinge on club side|
|MLS Preview: Tough tests for Conference leaders, Revolution still struggling|
|Mathieu not Barca material, says Marquez|
|West Brom claim unimpressive win in Sacramento|
|Neymar: Brazil behind Germany, Spain|
|Vietnamese police confirm match-fixing players|
|Lucescu blames Joorabchian for AWOL players|
|Robinho undecided on future|
|Rush: Still years left in Gerrard|
|Tiago re-signs with Atletico|
|Puyol against Spain overhaul|
|Agger considering his Liverpool future|
|Peruvian Primera Division Review: Juan Aurich bounce back, Melgar draw with Inti Gas|
|Bayern deny interest in Cuadrado|
|New signings on show in Hull double-header|
|Hooiveld strike sinks Swindon|
|Costa departs Valencia|
|Morata suffers knee injury in training|
|K.League Preview: Seoul, Sangju aim to close gap to sixth, Ulsan host Jeonbuk|
|Lewandowski off the mark on Bayern bow|
|Gerrard retirement will boost Liverpool - Carragher|
|World Cup bidding report due in September|
|Evra bids emotional farewell to United fans|
|J.League Preview: Ventforet Kofu look to escape drop zone, Sagan Tosu battle Kawasaki Frontale|
|Salah spared military service|
|Garcia would welcome Torres return|
|Livermore understands Ince decision|
|Cole happy to get away from English press|
|Evra seals Juve switch|
|Bayern stay was Kroos´ ´priority´|
|Scuffet: Udinese right place to continue developing|
|Gerrard retires from England duty|
|Ambitious Pochettino targets title|
|Aspas eager to put ´bad season´ behind him|
|Atletico Mineiro v Lanus: Visitors out to recover from first-leg loss|
|UEFA Europa League Preview: Sligo, Inter Baku out to finish shocks|
|Hughes expects Bojan decision soon|
|Cech on the mend - Holland|
|Pardew eager to honour crash victims|
|Prandelli hits back at critics|
|Negredo breaks metatarsal|
|Rooney eager to impress Van Gaal|
|Palacios´ Qatar move falls through|
|Wenger rules out striker signing|
|Six Shakhtar players refuse to return|
|Six Vietnamese footballers arrested for match fixing|
|Copa Libertadores Preview: Nacional Asuncion, San Lorenzo to host first legs|
|Mata hopeful of title|
|Napoli bullish about Scudetto chances|
|Colombian Primera A Review: Patriotas Boyaca, Deportes Tolima start with wins|
|Subotic thrilled to be back|
|Germain: Monaco can replace Rodriguez|
|Sullivan confident of Carroll improvement|
|Callejon staying put|
|DC United 3 Chivas USA 1: DC end Chivas´ winning run|
|Liga MX Review: Goalkeeping howler costs champions Leon, Monterrey move top|
|Chilean Primera Division Review: Huachipato, Santiago Wanderers opening-day winners|
|Brazilian Serie A Review: Internacional rout Flamengo, Cruzeiro win again|
|Prosinecki keen on South Korea job|
|Woodward promises new United signings|
|Chelsea´s Omeruo set for Middlesbrough return|
|Africa Cup of Nations Qualifying Review: Lesotho, Congo, Benin take first-leg leads|
|Ecuadorian Primera A Review: Deportivo Cuenco shock leaders Emelec, Independiente held|
|Rodriguez spotted in Madrid|
|Niang and Mastalli earn Milan win|
|Jutkiewicz at the double in Burnley rout|
|Crouch denies Gladbach victory|
|Hertha lead Biermann tributes|
|Vidic makes Inter bow in narrow victory|
|Rodriguez eager to leave Atletico|
|Thai Premier League Review: Buriram fail to close gap on Muang Thong, Chonburi gain ground|
|CSL Review: Guangzhou R&F take advantage as rivals Evergrande are held|
|Juventus and Lazio hold Astori talks|
|Lewandowski and Contento back in training|
|Sunderland target Borini joins Liverpool squad for US tour|
|K.League Review: Jeonbuk hammer Sangmu, Steelers march on|
|UEFA Champions League Preview: Buckley warns St Pat´s, Celtic primed to progress|
|Giaretta reveals Pereyra in demand|
|Kramer confirms Napoli talks|
|Nedved insists Juve key men going nowhere|
|Barton is a manager in the making - Redknapp|
|Monk unfazed from friendly setback|
|Holland: Lukaku not set to leave Chelsea|
|Debut nerves for Lambert|
|Woodward: Van Gaal will make United an attacking force|
|MLS Review: Sporting KC win again, Toronto held|
|Wenger: I´ll talk to Wilshere|
|Redknapp almost retired|
|Allardyce: Home form key for West Ham|
|Luis Enrique: ´We can´t draw conclusions yet´|
|Liverpool agree to sell Borini to Sunderland|
|Late Falque penalty spares Spurs blushes|
|Besler, Zusi agree Sporting KC contracts|