They were relatively lucky in Pahoa in 2014 and 2015.

A slow-moving flaming trail of 2,100-degree lava in October 2014 crossed Apaa Street, overran Cemetery Road, destroyed a Buddhist cemetery, burned a farmer’s shed and set a stack of tires and an open-air cattle shed on fire in the rural community of 8,200.

But then it stalled in early 2015. The flow was just 480 feet from Pahoa Village Road, Pahoa’s main street. The fingerling of fire was 400 yards from Pahoa Marketplace and about 600 yards from the police and fire stations.

The flow was about 13.5 miles long, the longest since Kilauea erupted again starting in 1983.

Mark Kimura, a researcher affiliated with the University of Hawaii at Hilo, was invited to speak to a group of students in Pahoa, the New York Times reported later.

“The good news is that you have plenty of time to evacuate, so you’re not going to die,” the Times quoted him saying. He added that not even geologists could predict whether the lava would hit the town.

Residents fled, schools and businesses closed and home sales temporarily plummeted.

“Everybody was just psychologically tired,” the Rev. Alan Tamashiro, pastor of Puna Baptist Church, said at the time after the so-called “June 27” flow.

In June 2014 an outbreak at Kilauea, 35 miles away, sent flows toward the Puna district on the east side of Hawaii island, noted the Geological Society of America.

The first indication of change at Kilauea was an inflation of the volcano’s summit and at Puu Oo, a cinder cone and lava shield and dominant vent for the East Rift Zone, the society said.

On June 27 new fractures opened on the northeast flank of Puu Oo, and lava advanced quickly along a narrow front to the east-northeast, according to the society.

In coming months, the society said, the flow skirted the northwest margin of Kaohe Homesteads above the town of Pahoa.

“By 30 October, the flow was within 150 meters (492 feet) of Pahoa’s main street, where it stalled, widening slightly without advancing over the ensuing days,” the society said, adding that damage also occurred to the Pahoa solid-waste transfer station.

The lava would advance, stall, widen and become inactive. Another lobe of lava breakout in January 2015 came within 1,600 feet of Highway 130 but also died out.

Direct impacts from the June 27 lava flow overall were minimal, considering the potential for destruction, the group concluded.

For months when the flow was threatening Pahoa, residents and county, state and federal officials prepared for the possibility that access could be cut off — a scenario that has played out again and again when disasters strike Hawaii, most recently on Kauai.