Bayern, which trailed by nine points at one stage, stayed second due to Dortmund's better goal difference. Dortmund can restore its three-point lead at home to Bayer Leverkusen on Sunday, but captain Marco Reus is out injured. The leader has failed to win in three league games while Leverkusen is on a four-game winning run.
Bayern had a score to settle with Hertha after losing 2-0 in Berlin earlier in the season and being pushed to extra time before progressing in their German Cup tie earlier this month. Coach Niko Kovac rewarded Martinez for his good performance at Liverpool with another start, while Leon Goretzka was back after an ankle injury and Franck Ribery also started.
But it was Hertha that had the best early opportunities. Davie Selke had a goal ruled out for offside before Jerome Boateng was forced to clear another good chance. Another Selke effort was cleared off the line by Joshua Kimmich early in the second half.
Hertha coach Pal Dardai's plan to keep the home side at bay functioned perfectly until Martinez broke the deadlock with a header from James Rodriguez's corner in the 62nd minute. Kingsley Coman, who came on in the 58th for Ribery, had to go off with an apparent left thigh injury nine minutes later.
Hertha's Karim Rekik was sent off late on after a tussle with Robert Lewandowski. Both players clashed but Rekik had his arm raised and Lewandowski dropped to the ground. SCHALKE WOES CONTINUE Schalke, which lost 3-2 to 10-man Manchester City in the Champions League on Wednesday, slumped to another defeat, 3-0 against a Mainz side that had lost its previous three games.
Schalke also announced that sporting director Christian Heidel would quit by the end of the season. Heidel achieved success in the same role at Mainz, but was coming under increased pressure due to Schalke's troubles this season. Domenico Tedesco's side is languishing 14th in the 18-team league.
Schalke's 23 points from 23 games is its worst tally for 36 years. The Gelsenkirchen-based club was relegated in 1983. FORTRESS NO MORE Third-place Borussia Moenchengladbach had won all its home games this season until Hertha grabbed a 3-0 win on Feb. 9.
Wolfsburg ensured Gladbach suffered a second successive 3-0 loss at home thanks to two goals from Admir Mehmedi. Freiburg routed relegation-threatened Augsburg 5-1 to give coach Christian Streich his biggest win since taking over in December 2011.
PROMOTED SIDES CLASH Fortuna Duesseldorf came from behind to defeat 10-man Nuremberg 2-1 in the late game. Brazilian midfielder Matheus Pereira was sent off in the fourth minute after he retaliated for an elbow to his head from Niko Giesselmann.
Despite the disadvantage, Eduard Loewen fired the visitors ahead before the break, but a late goal from Kaan Ayhan, after Ewerton's own goal, sealed the home side's comeback and ensured Nuremberg stayed bottom.
More AP German soccer coverage: https://apnews.com/Bundesliga and https://twitter.com/AP_Sports