BALTIMORE — Getting beat by the Ravens was bad enough. Losing control of their playoff destiny made things even worse for the Pittsburgh Steelers.

The Steelers are going to need some help to get into the postseason after falling to Baltimore 20-17 Sunday.

“We didn’t handle the business in the stadium today, so we’re left to look around at other stadiums,” Coach Mike Tomlin said after Pittsburgh’s three-game winning streak was halted. “Such is life this time of year when you don’t do what you’re supposed to do. And we didn’t today. We take ownership over that.”

By losing to their AFC North rivals, the Steelers (9-6) put themselves in a corner heading into their regular-season finale at Cleveland. At this point, Kansas City and the New York Jets own a better record in the race for the AFC wild card.

“It’s very disappointing because we knew that if we won this game, we would be in control,” linebacker Ryan Shazier said. “We just didn’t take care of business. That’s the most frustrating part.”

Making his seventh career start – the first with Baltimore – Ryan Mallett went 28 for 41 for a career-high 274 yards and a touchdown. Signed by the Ravens on Dec. 15, he was the fourth quarterback to start for Baltimore (5-10) in a span of six weeks.

The loss ended Pittsburgh’s 10-game winning streak in December.

DeAngelo Williams ran for 100 yards and had six catches for 53 yards. Ben Roethlisberger went 23 for 33 for 227 yards with two interceptions.

“We controlled our own destiny and we gave the ball away,” Roethlisberger said.

Up 20-10 with just over seven minutes left, the Ravens appeared to clinch the game when Jimmy Smith ran 101 yards with an interception for a touchdown. But Baltimore’s Courtney Upshaw lined up offside on the play, negating the TD, and Williams scored his second touchdown with 6:33 left.

The Ravens held on. On fourth-and-15 at the Pittsburgh 37, a pass from Roethlisberger to Markus Wheaton fell incomplete following the two-minute warning.

The Steelers didn’t get the ball again until there was 4 seconds left.

“This might sound brash, but we believed the whole time that we were going to beat Pittsburgh,” Smith said. “Records, score, how good they’re playing – nothing matters when you’re playing Pittsburgh.”

Smith limited the dangerous Antonio Brown to 61 yards, part of a strong defensive effort that gave Baltimore its first season sweep of its AFC North rival since 2011.

“You always want to beat them,” Upshaw said. “For us to have the type of year we did, then to sweep those guys, it’s big.”

Down 13-3 at halftime, the Steelers got back into it with the aid of two pass interference calls totaling 53 yards. The penalties, against Smith and Kendrick Lewis, led to a 1-yard run by Williams that cut the deficit to three points.