By Matthias Gafni

As Steve Marlin flew his small plane over the Caldecott Tunnel and downtown Orinda on Friday afternoon, everything was smooth. Then he heard a large pop. The sound pilots dread.

“It was POW!” Marlin recalled. “The engine was gurgling and I knew it was a matter of time.”

At an elevation of 2,000 feet, his 2005 yellow-and-blue Just Aircraft Highlander had a “total engine failure,” he said. The 62-year-old Oakland bush pilot had zero oil pressure and he struggled to keep the plane from stalling. He had seconds to find a place to land in the hilly East Bay suburbs.

“I was scared,” he said. “Then the training kicked in. Being a pilot was my first responsibility.”

Marlin, a 10-year pilot with experience landing “off-airport” in the backcountry of Idaho and other precarious locations, spoke to The Chronicle about his miraculous landing Friday before 4 p.m. as he stood next to his plane, about 50 feet off the Rim Trail that encircles the Lafayette Reservoir. He escaped the perilous landing uninjured with his plane undamaged.

He took off from Hayward airport and had planned to circle his friend’s Martinez house where he planned to fly Saturday morning.

“Just planned to do some reconnaissance,” he said.

The engine cut out — Marlin said he was unsure why. Once he lost power, he held back his panic.

“Fly the airplane,” he said of his first thought. “After that, where was I gonna land? My first thought was on the trails, but people were walking all over.”

As he lost altitude, he steered toward the popular hiking area with rolling hills and deep brush. He banked to a grassy ridge on a 30-degree slope and yanked back on the stick to land the plane on the up-slope of a ridge about 100 feet above a row of houses.

“I tried to dissipate the energy landing on the ridge uphill,” he said.

The plane came in at about 40 mph and rolled over the top of the ridge, down into a small gully and its momentum took it back up another ridge in a “half-moon circle,” Marlin said.

“I rode dirt bikes for 40 years, so I feel like I know what to expect from terrain,” he said.

It wasn’t his first close call in the air. A couple years ago he took off in his Bonanza, a four-person, faster aircraft, from Byron airport and he lost his electrical system. He had to loop around for an emergency landing, but made it to the airport unscathed.

As he checked over his aircraft Friday, East Bay Parks police and EBMUD employees surveyed the scene. Onlookers watched the bright yellow plane from the trail and their backyards. The area had already received plenty of news coverage recently after coyote that bit five people was captured Thursday less than a mile away.

Marlin said he planned to leave the plane overnight and pick it up in a trailer the next day. He felt like he may have had some help on his landing.

“I feel like God protected me,” he said. “Before every flight I say a prayer. Keep me safe. Keep the people on the ground safe. Keep my aircraft safe.”