NEW YORK (AP) — An off-duty correction officer has shot and wounded a man who attacked him with a pipe outside a fast food restaurant in Brooklyn.

It happened at 12:40 p.m. Saturday outside a McDonald’s on Church Avenue in East Flatbush.

Police say it began when a 67-year-old customer was attacked by the man. Correction officer Michael Turnbull intervened, but the man swung at him with a pipe and Turnbull drew his weapon and shot him in the leg.

Police say Turnbull shot him again in the leg when the attacker continued to swing at him.

The man was hospitalized in serious condition. His identity was not immediately released.

A Correction Department spokesman says the 35-year-old Turnbull joined the department in 2008 and was assigned to a jail at Rikers Island.

(Copyright 2011 by The Associated Press. All Rights Reserved.)