John Sweeney, on Route 20 — the longest US road — in Kenmore Square, nearly at the journey’s end. Keith Bedford/Globe Staff

To fully understand the wide smile on the face of the man in the bright yellow jersey as he rode into Kenmore Square the other day, you have to go back half a lifetime – 41 years to be precise — to a decision John Sweeney would come to regret for the rest of his life.

Sweeney and Stephen Josoma are first cousins, but they’re closer than that. They’re brothers really, boys who grew up in each other’s shadow in Brighton. Best friends. Constant companions.

In the summer of 1976, Josoma was headed for the priesthood. It was his last free summer after studying at St. John’s Seminary. A road trip was in order. Let’s bicycle across the US, the cousins decided — a trip that Josoma completed even after Sweeney bowed out.

“I’ve always just really felt bad about that,” Sweeney, now 61, recalled. “I regretted it for 40 years. I’ve had a good full life, but I’ve always wondered: Why did I back out?’’

He’ll never wonder that again.

Sweeney, a married father of two teenagers and a longtime Amtrak conductor, trained all winter. He bought a $1,700 Salsa Marrakesh bicycle in Portsmouth, N.H., packed it with a sleeping bag, tent, food, and clothing and — within hours of his son’s high school graduation in early June — was on a plane to Oregon. His bike and a 3,000-mile adventure of a lifetime awaited.

He averaged 65 miles a day, mostly along Route 20, a 3,365-mile ribbon of asphalt that is the longest road in the United States.

His longest ride was 102 miles, his shortest 28. He made mountaintop snowballs. He endured searing heat. There were four days of rain. And 56 days filled with breathtaking vistas, newly formed friendships, a single flat tire, and closer-than-comfortable calls with coyotes, rattlesnakes, and grizzly bears.

He’s filled a small notebook with tales from the trip, but the essence of what he learned wouldn’t fill a single page.

“People are good everywhere,’’ he said. “People always say that people are really good out West. But they’re good everywhere. I didn’t meet one bad person.’’

Who did he meet? People like this:

John Sweeney dipped his bike in the Pacific Ocean at the trip’s start. John Sweeney

■ A tattooed trucker from Louisiana, traveling with his wife from Alabama, who invited him into the cab of his truck — a sorely needed hour of warmth — and then handed him a blanket and a promise of hot coffee in the morning.

“God put us on this earth to help each other,’’ the trucker, a guy named Mark, told him.

■ A priest and a religious brother from Michigan City, Ind., who at first offered to let him camp on their property, but, after learning he worked for the railroad, offered a spot in the parish hall, instead. “Put bike in school and set up my camp and went for pizza,’’ he wrote in his journal. At the pizza shop, more new friends awaited. He later slept like a baby and reluctantly accepted $20 for breakfast from Brother Sean, his latest new friend.

■ Two women in Boise, Idaho, who within minutes of each other flagged him down and offered him a warm place to sleep that night. One’s husband repaired bikes. The other biked frequently with her husband. They had full appreciation for what a grind life on two wheels could be. In the end, he bunked instead with a friend of a friend who had a heavier sleeping bag for him.

“I had my own room and shower,’’ he said. “I completely washed all my stuff. I went out and had a beer with him. I get to the restaurant. We had a burger. The Red Sox were on TV. It didn’t get any better. That was the best night.’’

■ The farmer in Lost Springs, Wyo., a postage stamp of a place that got its name from railroad workers who failed to find the springs depicted on survey maps. “I said, ‘Where is everybody?’ ’’ Sweeney recalled. “He says, ‘Well, there used to be nine of us. There’s only six of us now.’ And he was right. I ride up the road and see the sign: ‘Lost Springs, Population 9.’ ’’

Along the way, he ate a steak dinner at an Iowa country club, another meal offered by a stranger. He stood in awe before a pristine lake at Yellowstone National Park, where he later witnessed a bison fight.

“The sky was just loaded with stars,’’ he said. “It was just gorgeous.’’

He navigated the Continental Divide. He rode into South Bend, Ind., and took a picture at the door of the dorm where his wife, Joanie, once lived at the University of Notre Dame. He ate chicken from the back of a truck owned by a friendly guy in an NRA ball cap. He bought ice cream for the children of helpful strangers, and, later that night, read bedtime stories to them. He munched on granola cereal, raisins, cashews, and M&Ms. He saw nighttime skies brightened by fireworks and fireflies.

He missed home.

“Homesick all the time,’’ he said. “I’ve got a good, close family. I knew I’d miss them. But I didn’t know how much it was going to hurt. It hurt.’’

Through it all, his family and friends back home tracked his progress as signposts disappeared behind him. Casper. Sioux City. Dubuque. Chicago. Euclid. Syracuse. Lee. Natick.

There were e-mails, phone calls, texts, and constant support from his wife of 21 years and their kids, Julia, 19, and Jack, 18.

“I was really worried,’’ Julia said. “This was his dream for 41 years, but I missed him a lot.’’

As his father approached the Massachusetts border, Jack joined him in New Lebanon, N.Y., a reunion that preceded four days together that father and son won’t soon forget.

“I knew how much it meant to him to make this trip,’’ Jack said. “I figured I’d bring him back to Massachusetts.’’

He had help.

After he rode into Kenmore Square, his friends at Amtrak arranged for a police escort to Castle Island. He’d dipped his bicycle tires into the Pacific along the Oregon coast two months before. And now those tires were in the Atlantic.

Afterward, Joan Sweeney affixed a handmade sign to the bike’s leather seat. “For Sale,’’ it read. “(Cheap)!”

On the sidewalk above the water, the man Sweeney calls his brother smiled under a bright summer sun.

Before his cross-country adventure, Sweeney had reached out for guidance from the Rev. Josoma, the man who’d made that journey a long time ago. He asked his cousin, the longtime pastor of St. Susanna Parish in Dedham, a simple question: Any advice?

Father Josoma responded with the most succinct sermon of his priestly career: Keep pedaling.