When the Boston Red Sox sunk to another low last week in Miami, being swept by the inept Marlins in a two-game series, a major deficiency surfaced again.

The bullpen.

Yes, the Red Sox offense disappeared at key moments. Boston’s inconsistent bats have been an issue all year.

And, yes, the starters hardly impressed, with Steven Wright going only five-plus innings, and Eduardo Rodriguez getting pounded. This is a rotation that ranks last in the majors in ERA and 26th in innings pitched.

But consider that Wright left the game in the sixth inning with no outs, two runners on and the Red Sox leading 4-0. Boston lost 5-4.

Rodriguez exited in the sixth, his team trailing 7-4 – still within reach. Miami won 14-6.

Teams with bad bullpens rarely go far. And Boston’s is bad.

How bad, you ask?

Red Sox relievers rank 24th among the 30 major league teams in ERA.

They also rank 24th in WHIP (walks/hits allowed per inning).

They rank dead last in WAR (wins above replacement) according to fangraphs.com.

But why are we picking on the Red Sox bullpen, when so much else is wrong with Boston’s roster?

Because good teams have respectable pens. And if Boston is going to get back to winning, the bullpen needs rebuilding.

Four of the top eight bullpens in the majors, when ranked by WAR, belong to first-place teams – the Royals, Cardinals, Astros and Yankees. Three of the others are in contention for the playoffs – the Blue Jays, Cubs and Orioles.

In its championship season of 2013, Boston got solid-enough relief (13th in the majors) and starting pitching (14th) and then pounded teams with its top-ranked offense.

But now the Red Sox are free falling and looking at consecutive last-place finishes.

To fix that in 2016, Boston could blow up its roster and start again at considerable cost. The Red Sox are already committed to paying $142 million to 10 players next year (including Allen Craig), assuming they pick up Clay Buchholz’s option for $13 million.

Boston can bring in more high-price free agents or shake things up with a big trade. Either or both might work.

But one action the Red Sox must implement is an overhaul of the bullpen.

Boston has had two effective relievers – closer Koji Uehara (ranked seventh among American League relievers in WAR), who is now out for the year, and Junichi Tazawa (10th), who might be even more effective were he not used so much.

But Tazawa is called upon often because the Red Sox have few dependable options. The next-highest ranked Boston reliever is Tommy Layne at No. 85.

The Yankees, for instance, have much better bullpen depth (three ranked in the top 15, six in the top 60) so even though New York’s starters are 21st in the majors in innings pitched, the Yankees can cover those later innings.

Boston needs more quality.

After Uehara and Tazawa, Boston has five open spots. Here is how the Red Sox can fill those:

 Move Joe Kelly to the bullpen. As a starter, he is 5-6 with a 5.61 ERA, lasting five innings a game. His average fastball velocity is the best on the team (95.6 mph).

Trade for a quality reliever or two. Boston has a few trade chips, maybe even a current starter like Wade Miley.

Sign the best available free agents. We hear all the time that judging bullpen talent is such an inconsistent science because of the up-and-down nature of relievers’ performances. But there are good bets on the free-agent market this offseason. Bringing in several proven arms can only move the odds in Boston’s favor.

Take a look at these five free agents after the 2015 season – Orioles right-hander Darren O’Day, age 32, 1.25 ERA/0.99 WHIP; Mets right-hander Tyler Clippard, 30, 2.53/1.17; Indians right-hander Ryan Webb, 29, 2.37/1.05; Padres right-hander Shawn Kelley, 31, 2.83/1.06; and Royals left-hander Franklin Morales, 29, 2.58/1.10.

Morales was once with Boston, before he was traded to Colorado. He signed a minor-league contract with Kansas City and is enjoying a rebirth.

Gather all other arms available. Among the candidates are all Red Sox who will still be under contract (Craig Breslow and Alexi Ogando will likely be gone after this year). They include Layne (lefties are hitting only .159 against him) and Matt Barnes (who can still develop into a powerful back-end reliever). Maybe a couple of them will stick in Boston; others will head to Pawtucket or be released.

These Boston Red Sox need to fix so much. Maybe that coveted ace, or the bat that ignited the whole lineup.

But bullpen construction cannot be overlooked, lest the Red Sox eye a continued collapse in 2016.