FORT MYERS, Fla. >> The Boston Red Sox hoped to work out a new deal for manager John Farrell before they opened camp.

They nearly got it done.

So while Boston pitchers and catchers held their first official workout Saturday, the team announced that Farrell’s contract had been extended through the 2017 season, with a team option for 2018.

“On behalf of ownership, there’s no question in our mind John is the right man to manage this team,” general manager Ben Cherington said. “We want him to be here for a long time given that he’s in the final year of the contract he signed here.”

“We wanted to get something done prior to spring training.

“We almost made it. First day of camp,” he said.

The 52-year-old Farrell took over the Red Sox after a last-place finish and guided them to the World Series championship in 2013. Boston slid back to the bottom of the AL East last year with a 71-91 record.

The Red Sox made several big moves in the offseason, signing All-Star free agents Pablo Sandoval and Hanley Ramirez and trading for pitcher Rick Porcello.

After the Red Sox concluded their workout, Cherington and Farrell sat in the shade of JetBlue Park and talked about the deal.

“Well, first and foremost I’m ecstatic about the extension,” Farrell said.

Boston is coming off a rocky season in which it used 55 players, including 19 rookies. A year earlier, the Red Sox went 97-65 while winning their third World Series crown in 10 seasons.

Red Sox fans are counting on a big bounceback.

“We don’t take for granted one moment what the expectations are and how we have to deliver on those expectations,” Farrell said.

Cherington reiterated that Farrell is an outstanding fit for the Red Sox.

“I think you guys know a lot goes into the manager’s job in Boston,” Cherington said. “What happens between inning 1 and 9 is just a small part.”

“Yes, you have to make decisions during a game, but you got to be able to communicate with all sorts of different people — players, staff, front office, ownership and external, too,” he said. “You’ve got to be able to handle difficult situations with honesty, with integrity. You got to be accountable. You got to have credibility, respect from all those different people that you’re working with. And John has the ability to do all those things.”

Farrell was Boston’s pitching coach for four seasons under manager Terry Francona before becoming Toronto’s manager for 2011-12.

In four years as a major league manager, his record is 322-326.

Farrell returned to the Red Sox in October 2012 and signed a three-year contract through 2015. Boston got Farrell and pitcher David Carpenter from Toronto for infielder Mike Aviles.

Farrell had been under contract to the Blue Jays through 2013.

The former pitcher played eight seasons in the majors, going a combined 36-46 with a 4.56 ERA for Cleveland, the Angels and Detroit.

While the first full workout is scheduled for Wednesday, Farrell said 52 of the 57 players invited to spring training were on the premises Saturday.

“The energy is very good,” Farrell said.

Among the position players reporting early to camp was star second baseman Dustin Pedroia, who was limited to 135 games last year because of thumb and wrist problems. His 2014 season was cut short in September to have surgery.

Pedroia hit .278 last year, dropping his career average to .299. He’s excited about Boston’s new additions and embraces the challenge this season.

“I like it,” Pedroia said. “I understand it. I get it. If you don’t perform well as a team and win, there’s consequences. That’s how you should be and that’s the way I play.”