HYANNIS — As the CapeFlyer rolled down the tracks from South Station to this Cape Cod village, scenes of summer flashed by: fishermen wielding nets in marshy inlets, people in swimsuits lined up outside the Water Wizz amusement park; cars crawling over the Bourne Bridge.

Napping couples, bicyclists in matching spandex outfits, and families wrangling with toddlers filled the first few cars. When the train pulled into Hyannis after a 2½-hour journey on a recent Saturday morning, passengers spilled onto the platform, renting bikes to hit nearby beaches and hopping on buses bound for the Outer Cape.

Peter Martino, owner of the Heritage House Hotel across the street from the Hyannis Transportation Center, where the train arrives, said the number of bookings by train passengers is a small but significant fraction of the 2 million who visit the Cape each summer.

“It’s people that wouldn’t have stayed here in the past,” he said. “I’ll take it.”

Train service between Boston and the Cape has been attempted several times over the years, but this iteration has a better chance of success, said Thomas Cahir, administrator of the Cape Cod Regional Transit Authority, which operates the CapeFlyer.

Restored rail lines make the ride faster and smoother, he said, while high gas prices and the desire to avoid traffic jams like the 25-mile backup over the 4th of July weekend are prompting more people to leave their cars at home.

There are also more transportation options waiting for passengers when they get off the train.

Regularly scheduled bus service to all 15 towns on Cape Cod has been established in the past few years at the Buzzards Bay and Hyannis stops.

Enterprise Rent-A-Car set up a desk inside the Hyannis train station, and Sea Sports rents bicycles right outside.

“There’s no question in my mind that passenger rail service, if it’s done right, can be overwhelmingly successful,” Cahir said.

The double-decker commuter train, provided by the Massachusetts Bay Transportation Authority, travels between Boston and Hyannis once a day each way on Fridays, Saturdays, and Sundays for $35 round trip.

Many travelers don’t stay in Hyannis for long.

‘It has opened up a crowd of people that wouldn’t normally come here because they don’t want to drive.’

A group of European twentysomethings studying English in Boston boarded the Plymouth & Brockton bus for a day trip to Provincetown, where they visited Pilgrim Monument and ate pizza and lobster rolls at a seaside restaurant.

They enjoyed their visit but had only four hours to explore before they had to turn around and catch the 6:30 p.m. train back to Boston, making them doubt they would make the trek again.

Still, ridership on Plymouth & Brockton’s weekend Hyannis-Provincetown routes that coincide with the CapeFlyer service has risen about 10 percent, which the company attributes to train travelers.

Ferries to Nantucket also send shuttles to the train station to pick up passengers.

Jenny Stevenson, 38, of Colorado, and her friend Sarah Ernst, 40, of Arkansas, were taking their children to visit Ernst’s family on the island. Stevenson, who used to live in Boston and date a man who lived on Nantucket, remembers the anxiety of trying to find a place to park at the ferry landing. “This is much more convenient,” she said.

Elizabeth Wurfbain, executive director of the Hyannis Main Street Business Improvement District, said the train has introduced a new group of people to Hyannis — young bicycle enthusiasts.

Bike racks in the first car of the train have hit capacity more than once, forcing the train crew to find other places to stow them.

“It has opened up a crowd of people that wouldn’t normally come here because they don’t want to drive,” Wurfbain said. “Without taking that trip with the car, it’s so much more pleasant.”

David and Kathleen Brill were headed to Hyannis with their bikes recently, planning to relax at a beach in Dennis on Saturday and ride the Cape Cod Rail Trail, a bicycle path, on Sunday.

The Brills, lawyers who live in Boston and don’t have a car, said they usually rent a car or take the bus about once a year to visit the Cape, but plan to come more often because of the train.

“It makes it easier and a lot more fun,” said David Brill, 32.

Another carless Boston resident on the train, LouLou Cabour, knitting a sweater to pass the time, was making her fifth CapeFlyer trip to visit her mother in Barnstable.

Cabour, 53, took the train in the 1980s when “nobody was on,” and was pleased to see that the new train getting more crowded.

Over the 4th of July weekend, however, she wasn’t on it. She was stuck behind the wheel of her mother’s car, trying to get off the Cape behind thousands of other people.

Was she wishing she was on the train?

Definitely, she said, recalling hours of braking and accelerating to go just a few miles: “My foot was wishing it.”

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.