A baby received “the smallest pacemaker in world” to help him recover from a dangerous heart condition, CBS News Philadelphia reported on Friday. 

The tiny pacemaker that is keeping the baby alive was adapted for him, necessity being the mother of invention,” according to the report.

Six-month-old Cameron Knowles is celebrating his half birthday after being born with a heart block, as well as problems feeding and breathing. His mother, Shakiara Pressley told the outlet, “For a while, we didn’t know if he would make it.”

Cameron needed a pacemaker to survive, “but there was a size issue,” according to the report.

“None of the devices are made for children or designed for the pediatric body size,” Dr. Maully Shah, with Children’s Hospital of Philadelphie (CHOP), said.

Shah improvised to create the world’s smallest pacemaker, which has a battery and sends an electrical impulse to baby’s heart, the doctor said. 

The pacemaker is reportedly the size of a AAA battery and was specially created for Cameron. The team at CHOP then worked to receive U.S. Food and Drug Administration (FDA) clearance to use the pacemaker.

“This is a unique situation because Cameron is one of ten kids in the whole world to get this kind of pacemaker,” Shah said.

While pacemakers are usually placed inside an adult heart, the tiny pacemaker for Cameron was placed just outside his heart. Doctors said that will allow for a quicker recovery.

Pressley said that the decision to try something new was “difficult” but she is “so thankful that it was an option for us.” As for the baby, he is recovering and still needs help with breathing, but he will be allowed to go home soon. 

“He works hard to be here,” Pressley said. “I’m going to do whatever I can to keep him here.”

When Cameron goes homes, doctors will be able to monitor his heart using a transmitter connected to the pacemaker, according to the report. The pacemaker will eventually have to be replaced as the six-month-old baby grows.