If you simply look at statistics, the Toronto Blue Jays have no business being in a close race with the Boston Red Sox and Baltimore Orioles.

The Blue Jays should be running away with this thing, given that they have the best ERA in the American League (3.72) and are third in scoring (598 runs).

Then factor in the Orioles’ crumbling starting pitching, and Boston’s prolonged slide from June 1 to Aug. 11, when the Red Sox went 29-32.

Yet we have quite a race on our hands.

These are winning teams, but all with flaws. Look at recent results:

Boston led Detroit 3-1 on Thursday, but the Tigers scored three runs off two relievers in the bottom of the eighth. The Red Sox lost, 4-3.

 Toronto led 2-1 in the ninth inning Friday at Cleveland. But closer Roberto Osuna gave up two home runs, including one inside the park, and the Blue Jays lost 3-2.

 Baltimore hit five home runs Friday, including four in the first inning, but still lost, 15-8 to Houston.

At times, all three of these teams appear ready to roll, but then they trip over themselves.

Toronto still has the best pitching, Osuna’s blown save aside. And the Blue Jays feature a lineup of sluggers, second to Baltimore in home runs.

Baltimore has the best bullpen of the three (3.34 ERA). And, as mentioned, the Orioles can hit the long ball.

Boston’s starting rotation has been the best in the league in August (2.48 ERA), and its relentless lineup makes up for their opponents’ advantage in home runs. The Red Sox lead the league in runs scored and run differential.

So, who will win this division?

Toronto should be the favorite if the Blue Jays figure out a way to stay healthy.

Or it could be Baltimore if the Orioles’ starting pitching improves.

Or Boston can blow away the others if the bullpen is done resembling a construction zone.

Here is a closer look at all three teams (statistics are through Friday’s games).

n Toronto entered Saturday with a half-game lead over the Red Sox (even in the loss column).

The Blue Jays acquired starter Francisco Liriano and have used a six-man rotation to limit the innings of young ace Aaron Sanchez (2.84 ERA). JA Happ (17-3, 3.05) is an unexpected star.

The bullpen (24 losses) was once considered as shaky as Boston’s, but the acquisition of Joaquin Benoit has been beneficial, to go along with Osuna and Joe Biagini (2.05 ERA).

With the likes of Josh Donaldson, Edwin Encarnacion, Jose Bautista and Troy Tulowitzki, Toronto’s offense should be more potent. The Jays have scored 81 fewer runs than Boston.

Injuries have played a role. Bautista is on the disabled list for the second time (sore knee).

Plus, the lineup has holes. At the 7-9 spots, Toronto’s production is among the worst in the league (.530 OPS at No. 7, .664 at No. 8, and .603 at No. 9). That kills a lot of rallies.

Despite the pitching and run production, the Blue Jays are terrible in close games. When the difference is one run, Toronto is 13-21.

n Baltimore once had the best bullpen in the American League. It is now second, as the ERA has inched up to 3.34. That may be a result of wear and tear – with a starting rotation that’s 12th in the American League (4.94 ERA), averaging 51/3 innings a game. The Orioles acquired Wade Miley, who has been little help so far (0-2, 9.53).

The bullpen has good arms, led by dominant closer Zach Britton (0.54 ERA). But Darren O’Day is on the disabled list and has yet to begin throwing because of a sore shoulder.

The offense has produced a .774 OPS, second to Boston’s .821, but Baltimore has scored 95 fewer runs.

On paper, Baltimore should not be keeping up in the AL East. And the failing rotation may finally be the Orioles’ downfall.

Baltimore is OK in one-run games (14-13).

 Boston’s bullpen has 21 losses, and those defeats appear to be multiplying. The Red Sox need defined set-up roles in the later innings. Junichi Tazawa (4.58) is worn down and newly acquired lefty Fernando Abad (9.00 ERA) hasn’t adjusted well (and that’s being kind). There is hope that Matt Barnes, Brad Ziegler and maybe even Joe Kelly can keep a lead for Craig Kimbrel.

The other hope is that the starters go deeper in games. Boston’s rotation is doing better. In August, the starters have averaged 61/3 innings, which includes Clay Buchholz making two spot starts in place of injured Steven Wright and Eduardo Rodriguez leaving a game early with a tight hamstring.

The lineup has few holes. Five spots in the lineup rank first or second in OPS. That creates many scoring opportunities.

While the Red Sox have fewer home runs (157) than Baltimore (188) or Toronto (175), most of Boston’s homers come with runners on base (producing 269 runs from its homers), while Baltimore (287 runs) and Toronto (275) hit more solo home runs.

Boston needs that offense. In the last 20 games in which the Red Sox have scored three or fewer runs, they are 3-17.

In one-run games, Boston is 14-15.

The remaining six weeks will be interesting, with several intradivision games. Boston has seven games left with Baltimore (three at home) and six left with Toronto (three home). The Orioles and Blue Jays play each other six more times.