World number one Roger Federer suffered his first opening-round defeat since 2004 when he lost 6-7 6-3 6-4 to unseeded Briton Andy Murray in the Dubai Championships on Monday.