(CNN) -- Kids dig in the sand at the beach all the time, but the fun nearly turned fatal for an 11-year-old Pennsylvania boy this week.



The 11-year-old was given CPR and revived before being taken to a local hospital.



The boy was digging a tunnel with friends on a beach in Ocean City, Maryland, on Tuesday when part of it collapsed on top of him, authorities said.



Lifeguards rushed to pull him out, but it first appeared that they were too late. The boy was not breathing, and he had no pulse, Beach Patrol Capt. Butch Arbin told CNN on Wednesday.



But rescue crews revived the boy by performing CPR, said Arbin, who was at the scene.



There was a lot of emotion on the beach when the boy's pulse came back, he said.



"He basically went from dead to life," Arbin said, adding that the boy's mother called the rescue a "miracle."



As he was being rolled into an ambulance on a stretcher, the boy -- perhaps not realizing the trauma he had just survived -- complained to his mother that he had sand in his eyes, Arbin said.



The child, whose family did not want to be identified, was initially taken to Atlantic General Hospital and later flown to the A.I. DuPont Hospital for Children in Delaware, he said.



He's recovering there and probably will be released later Wednesday, Arbin said.
What did the Beach Patrol captain say? Lifeguards rushed to help; boy had no pulse and? Beach Patrol captain: He basically went from? What happened to boy? Where was the boy digging the tunnel? Boy, 11, was digging a tunnel with? Where is Ocean City? When is the boy expected to be released? When is the boy expected to be released? Who was digging a tunnel? where was that accident Who rushed to help? Where is the boy recovering? What was the boy digging?
The boy was not breathing, and he had no pulse, was not breathing, dead to life," was digging a tunnel with friends on a beach in Ocean City, Maryland, on Tuesday when part of it collapsed on top of him, authorities said. on a beach in Ocean City, Maryland, friends Maryland, later Wednesday, Wednesday, 11-year-old beach in Ocean City, Maryland, Lifeguards A.I. DuPont Hospital a tunnel
question: What did the Beach Patrol captain say?, answer: The boy was not breathing, and he had no pulse, | question: Lifeguards rushed to help; boy had no pulse and?, answer: was not breathing, | question: Beach Patrol captain: He basically went from?, answer: dead to life," | question: What happened to boy?, answer: was digging a tunnel with friends on a beach in Ocean City, Maryland, on Tuesday when part of it collapsed on top of him, authorities said. | question: Where was the boy digging the tunnel?, answer: on a beach in Ocean City, Maryland, | question: Boy, 11, was digging a tunnel with?, answer: friends | question: Where is Ocean City?, answer: Maryland, | question: When is the boy expected to be released?, answer: later Wednesday, | question: When is the boy expected to be released?, answer: Wednesday, | question: Who was digging a tunnel?, answer: 11-year-old | question: where was that accident, answer: beach in Ocean City, Maryland, | question: Who rushed to help?, answer: Lifeguards | question: Where is the boy recovering?, answer: A.I. DuPont Hospital | question: What was the boy digging?, answer: a tunnel