BOSTON — Just like that, the Boston Red Sox have a starting rotation again.

With two deals announced on Thursday and a third coming soon, the Red Sox have rebuilt their starting rotation this offseason almost as quickly as they took it apart during the summer. Hours after trading for Detroit right-hander Rick Porcello, Boston signed righty Justin Masterson as a free agent.

A deal with Arizona for lefty Wade Miley, a former Southeastern Louisiana star, was still to be announced by the team.

“Once we got closer on those opportunities, we just felt like they all made sense,” Red Sox general manager Ben Cherington said during a conference call Friday. “We’re very happy with Justin here, and obviously, Porcello. And hopefully we’re getting closer to another one, too.”

Jon Lester, who spent his entire career in the Red Sox organization until he was shipped to Oakland at the trading deadline, was courted to return as a free agent. But when the Chicago Cubs outbid Boston for the 31-year-old lefty, Cherington quickly executed a backup plan.

Now, Masterson, Porcello and Miley will join holdover Clay Buchholz and one of Boston’s young arms — perhaps ex-LSU starter Anthony Ranaudo or Brandon Workman — in a rotation that is so far lacking an ace.

Astros

CLUB FINALIZES DEALS FOR RELIEVERS: The Astros finalized contracts with relievers Luke Gregerson and Pat Neshek.

Gregerson is guaranteed $18.5 million over three years and Neshek $12.5 million over two years. The contracts were agreed to this week at the winter meetings and announced Friday.

Gregerson, 30, spent five years with San Diego, then went 5-5 with a 2.12 ERA in 72 appearances for Oakland last season. Neshek, 34, has pitched for Minnesota, San Diego, Oakland and St. Louis. He was 7-2 with a 1.87 ERA for the Cardinals this year, when he struck out 68 in 67.1 innings and was picked for his first All-Star game.

Cardinals

REYNOLDS SIGNS FOR ONE YEAR: Mark Reynolds and the St. Louis Cardinals have agreed to a one-year contract.

The team announced the move Thursday night.

The 31-year-old Reynolds hit 22 home runs last season in his only year with Milwaukee. He batted .196 with 45 RBIs in 130 games.

Reynolds made 100 starts for the Brewers — 72 at first base, 29 at third and one in the outfield.

The right-handed-hitting Reynolds figures to boost the bench for the two-time defending NL Central champions. Matt Adams starts at first base for St. Louis and Matt Carpenter is at third.

Reynolds has hit 224 home runs in eight major league seasons with Arizona, Baltimore, Cleveland, the New York Yankees and the Brewers. He has also led the league in strikeouts four times.

Around the majors

RHP Jason Hammel and the Cubs finalized a $20 million, two-year contract to return to the Cubs, a deal agreed to earlier in the week. ... LHP Nelson Liriano and the Pirates have finalized their $39 million, three-year contract. ... OF Nick Markakis will receive a $2 million signing bonus by Jan. 1 as part of his $44 million, four-year contract with the Atlanta Braves.