Man Utd's Nani celebrates scoring against Manchester City at Wembley. REUTERS

Manchester United came from two goals down to defeat rivals Manchester City 3-2 in an entertaining Community Shield encounter at Wembley on Sunday.

Defender Joleon Lescott and striker Edin Dzeko scored late in the first half to surprise defending champions United, who had dominated the early stages of the season's curtain raiser.

City sat back after half-time and invited United pressure. Defender Chris Smalling poked Ashley Young's free-kick past Joe Hart from close in and Nani converted a swift passing movement with a delightful chip on 58 minutes.

As extra-time beckoned, Nani took advantage of an uncharacteristic lapse from City defender Vincent Kompany to nip in behind Joe Hart and snatch the winner.

"It was a very good performance in terms of our football," United manager Sir Alex Ferguson told Sky Sports.

"I couldn't believe we were 2-0 down at half-time but goals change games. The players kept their heads, played their football and for the result they deserved."