Narrative:

Takeoff roll started with maximum EPR (weight) and engine anti-ice on (temperature and rain). At rotation and as main gear just lifted off, a continuing series of loud bangs which could be heard and felt in the cockpit occurred. First officer flew the loss of engine profile and I declared an emergency and requested vectors to return to ZZZ to land. When engine #2 idented with compressor stalls and when aircraft stable at acceptable altitude, throttle was brought to idle using the qrc. Stalls ceased and engine readings appeared normal. Engine was left at idle as we were about to land. Overweight, but otherwise normal landing was made on runway 4R. Emergency crews and ZZZ maintenance crews inspected engine on the taxiway. Returned to gate. There were no injuries. Pilot crew flew newly assigned flight to XXX same day.

Google
 

Original NASA ASRS Text

Title: A B767-200 ON ROTATION AND CLBOUT DECLARED AN EMER AND DIVERTED DUE TO #2 ENG LOSS OF PWR AND COMPRESSOR STALLS. CAUSE UNKNOWN.

Narrative: TKOF ROLL STARTED WITH MAX EPR (WT) AND ENG ANTI-ICE ON (TEMP AND RAIN). AT ROTATION AND AS MAIN GEAR JUST LIFTED OFF, A CONTINUING SERIES OF LOUD BANGS WHICH COULD BE HEARD AND FELT IN THE COCKPIT OCCURRED. FO FLEW THE LOSS OF ENG PROFILE AND I DECLARED AN EMER AND REQUESTED VECTORS TO RETURN TO ZZZ TO LAND. WHEN ENG #2 IDENTED WITH COMPRESSOR STALLS AND WHEN ACFT STABLE AT ACCEPTABLE ALT, THROTTLE WAS BROUGHT TO IDLE USING THE QRC. STALLS CEASED AND ENG READINGS APPEARED NORMAL. ENG WAS LEFT AT IDLE AS WE WERE ABOUT TO LAND. OVERWT, BUT OTHERWISE NORMAL LNDG WAS MADE ON RWY 4R. EMER CREWS AND ZZZ MAINT CREWS INSPECTED ENG ON THE TXWY. RETURNED TO GATE. THERE WERE NO INJURIES. PLT CREW FLEW NEWLY ASSIGNED FLT TO XXX SAME DAY.

Data retrieved from NASA's ASRS site as of July 2007 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.