 He then won the Rotterdam Open for the first time since 2005 , defeating Juan Martin del Potro . Federer played in the 2012 Dubai Tennis Championships , where he defeated Andy Murray in the final and won the championship title for the fifth time in his career . Federer then moved on to the Indian Wells Masters , where he defeated Rafael Nadal in the semifinals , and John <unk> in the final . Federer won the title for a record fourth time , and , in doing so , equalled Rafael Nadal 's record of 19 ATP Masters 1000 titles . 
