Rob O’Gara’s whole world changed with the stroke of a pen.

The 22-year-old defenseman from Nesconset signed a two-year entry-level contract with the Boston Bruins March 28, making the jump from Yale to professional hockey.

O’Gara made his AHL debut with the Providence Bruins April 1 and will play the remainder of the season there — with the possibility of playoffs — on an amateur tryout agreement. His contract doesn’t kick in until next year.

He’s had a few other firsts in a whirlwind week, he said, including moving into his first apartment, buying his first car and adjusting to a new schedule that includes regular trips between Providence and Yale.

“It’s crazy to think it’s only been a week since I left,” said O’Gara, who still has four classes to complete before graduating with a degree in economics next month.

“My first night before my first practice I was like, ‘wow, I’m here.’ Three days before I was getting ready for what was going to be my last college game. When I really sit back and think about it, it’s very cool and exciting. It’s what you work for from when you’re a little kid.”

The Bruins drafted O’Gara in the fifth round in 2011 out of Milton Academy, a prep school near Boston with a historically strong hockey program.

advertisement | advertise on newsday

O’Gara went to Smithtown East and said he chose to repeat his junior year after transferring to Milton to have more time to develop before college. He spent two years with the Mustangs and won the New England Championship his junior season there.

Success followed the 6-4, 207-pounder to Yale. He was a candidate for the Hobey Baker award this year, given to college hockey’s top player, and had four goals and 12 points. O’Gara helped lead the Bulldogs in 2013 to their first ever national championship as a freshman and has been invaluable since then.

“He really epitomizes what we want our hockey players to be,” said Yale coach Keith Allain, who also worked in the NHL for 15 years as an assistant coach, goalie coach and scout.

“He’s got great size and reach. He’s extremely mobile, particularly for a big guy. He has great defensive awareness, can make a pass and he’s got the ability to jump up into the play on offense. I see him as an all-around defenseman. I expect him to one day be a regular defenseman in the National Hockey League.”

Christine, O’Gara’s mother, said she has a home video of Rob skating for the first time — unsuccessfully — and added that he’s come a long way since taking up hockey at age five.

Rob’s father Brian said his son fell in love with the game watching the Islanders and NHL stars of the ‘90s such as Scott Stevens and Chris Pronger. He said he and Rob bonded during knee hockey games in the family’s unfinished basement.

“The thrills and happiness he’s given everybody in this family while combining it with a great college degree . . . you couldn’t ask for more,” Brian said. “His professional journey is just beginning.”

Added Rob: “Hockey’s the thing I love most in the world. When I decided I wanted to do it and it became a possibility, those milestones built on each other perfectly and led up to this point. I’m very lucky for the experience I’ve had. Hopefully these baby steps continue.”