YARMOUTH — In February, Sam Gerken finished second in the 800-meter run at the Class B indoor track and field state championships. His goal this spring is to break 2 minutes in the event.

That’s impressive for any 17-year-old athlete.

More remarkable is that Gerken had open-heart surgery less than a year ago.

“I was very nervous,” he recalled feeling just before the surgery last June. “I was worried that I might not be able to run again.”

The Yarmouth High senior was born with a rare condition known as pulmonary atresia – found in about 1 of 10,000 children born in the United States, according to the Centers For Disease Control and Prevention.

Pulmonary atresia prevents blood from flowing from the right ventricle to the lungs because of a faulty valve. As a result, the body is not properly enriched with oxygen.

Gerken needed surgery within days of his birth to survive.

“For two or three days, we didn’t know if Sam was going to live,” said Susan Elias, Gerken’s mother. “It’s the toughest thing I’ve gone through.”

But as in the case of many born with pulmonary atresia, the condition may require more surgery later in life. By adolescence, Gerken knew he would need a second surgery.

Gerken has competed on the cross country and track teams at Yarmouth High. All during his junior year, Gerken felt he was running with a lead weight.

“The best way to put it was that my heart would limit the speed I could run,” he said.

He had a rudimentary valve that was allowing blood to flow back into the right ventricle. It was creating abnormal pressure in the chamber, which can lead to thickening of the walls.

“That can cause an abnormal rhythm and an irregular heartbeat,” Elias said. “It would have shortened Sam’s life if he didn’t have surgery,” she said.

Approximately 6,000 open-heart surgeries are performed annually in the United States on children between the ages of 1 and 18, according to Cincinnati Children’s Hospital. Elias said there was some leeway when her son’s operation could be performed. They opted for last summer.

“My parents and I decided it would be better to have surgery going into my senior year than have it going into my freshman year of college,” Gerken said.

Dr. Reed Quinn, a pediatric heart surgeon with Maine Medical Partners, performed the operation on Gerken when he was two days old and again last year.

“The first operation was to patch a hole in his heart and augment the right ventricle valve flow,” said Quinn.

Gerken’s condition was caused by an abnormal development of the fetal heart during the first eight weeks of pregnancy.

“It’s relatively rare,” said Quinn.

“Last June we replaced a pulmonary valve. It was harvested from a pig and mounted in a stent.”

Gerken comes from an athletic family, which may have aided in his recovery after surgery. Elias was a track standout at the University of Maine. After track, she became a competitive cyclist and competed in three women’s Tour de France races. His father was also a competitive cyclist.

“Sam certainly has the endurance gene,” said Yarmouth track coach Mike Griffin.

Still, Gerken’s recovery last year was frustrating at times.

Four days after the surgery, he tried walking a mile.

“It took me a hour,” he said.

But within 10 days, he tried jogging.

“I was surprised I was able to run so early after surgery,” he said.

In September, he ran in a cross-country meet, a 5-kilometer race (3.1 miles).

“I went out too quick and I had to drop out,” he said.

His father, John, was at the finish line, anxiously waiting for his son to round the final turn.

“When I didn’t see him when I thought I should have, I started to worry. I feared he might be lying flat on the course,” said his father.

Gerken walked in, long after the other runners finished.

During the cross-country season, Gerken and his coaches were mainly concerned with building his stamina. That improved with each race and Gerken had his best race at the regional cross country championships.

Gerken won his first 800 race for indoor track in a time of 2 minutes, 4.1 seconds. At the state championships, he set a personal best of 2:02.2.

“I really got into a good running groove during the winter track season,” he said.

Griffin said Gerken is a team leader and determined to excel.

“It’s been remarkable the progress he has made since last summer when he had surgery. He was determined to get back without losing a thing. He’s very goal-minded, which has helped his comeback,” he said.

His distance coach, John Rogers, can see the difference.

“The surgery gave him a new outlook and a fresh perspective,” Rogers said. “Sam can run without fear and totally uninhibited. He’s training on the expectations he can run 2 minutes or under, and his workouts are structured that way.”

Quinn said Gerken could be looking at surgery again in 15 years, but he won’t need open-heart surgery. Quinn said the procedure used would be a valvuloplasty.

Gerken is not worrying about another surgery right now. Next fall he will attend Wentworth Institute of Technology in Boston to study architecture.

And on June 6, just shy of the anniversary of his surgery, Yarmouth High will host the Class C track and field state championships – with Gerken aiming to win the 800 meters on his home track.

“The doctors have given me this incredible opportunity,” he said. “I have more power and I feel more driven. It’s almost like my heart isn’t working.”