Updated

A New Jersey town employee was struck by lightning Wednesday, as storms moved into the area while he was working on an athletic field, officials said. 

Eric Baumgartner, 39, was painting lines on a soccer field at Iselin Middle School in Woodbridge Township when he was struck by the bolt, Mayor John McCormac said during a news conference. 

McCormac said Baumgartner was with two other employees around 12:21 p.m., when the thunderstorm approached the area.

1 OF 2 FIRES IN NEW JERSEY'S PINE BARRENS FULLY CONTAINED

"They were using some kind of metal machinery to paint the lines, and he was struck," McCormac said. "He had burns on his foot and other parts of his body."

New Jersey lightning strike

A doorbell camera captured a lightning strike that injured a New Jersey public employee on a nearby soccer field.  (Courtesy of Bhrugesh Vaidya)

The strike was captured by a doorbell camera nor far from the scene.

A police officer, identified as Robert "RJ" McPartland, was nearby and rushed to the scene and began CPR on Baumgartner.

"I'm just happy that I was close and was able to get to him as fast as I did," he told reporters.

McCormac credited the officer with saving Baumgartner's life. He added that Baumgartner was unconscious and without a pulse before the officer arrived. 

CLICK HERE TO GET THE FOX NEWS APP

He was taken to Robert Wood Johnson University Hospital in New Brunswick.

"I just visited him in the hospital, where he is with his wife, and he's awake, alert and in good spirits," the mayor told Patch. "I walked in, and he said, 'Hey, Mayor Mac.' It's better than how it was looking when I first got the call, when the first words I heard were 'you better pray' because this just happened."

Fox News Digital has reached out to McCormac and the city.