Narrative:

After takeoff on runway xx at ZZZ; on the climb at 300 feet the number 2 engine started to compressor stall. There were 2 loud bangs; the aircraft shuddered; and flames were observed coming out of the engine by the passengers. The number 2 N1 dropped from approximately 93% to approximately 71% during the stalls. As soon as the thrust was reduced the compressor stalls stopped. We [advised ATC]; completed the QRH steps (the engine was stabilized so we did not shut it down); and landed at ZZZ1.

Google
 

Original NASA ASRS Text

Title: B737 flight crew reported that after takeoff the Number 2 engine experienced a compressor stall; but functioned at a reduced power setting until a diversion to a suitable airport could be accomplished.

Narrative: After takeoff on Runway XX at ZZZ; on the climb at 300 feet the number 2 engine started to compressor stall. There were 2 loud bangs; the aircraft shuddered; and flames were observed coming out of the engine by the passengers. The number 2 N1 dropped from approximately 93% to approximately 71% during the stalls. As soon as the thrust was reduced the compressor stalls stopped. We [advised ATC]; completed the QRH steps (the engine was stabilized so we did not shut it down); and landed at ZZZ1.

Data retrieved from NASA's ASRS site 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.