Former Baltimore Ravens offensive coordinator Cam Cameron speaks with quarterback Joe Flacco during a practice session at the team’s training camp in Baltimore.

OWINGS MILLS, Md. — Cam Cameron was fired Monday as offensive coordinator of the Baltimore Ravens, who have lost two straight and are still striving for consistency in the running and passing game.

Cameron ran the Baltimore offense since the start of the 2008 season for coach John Harbaugh. Since that time, the Ravens’ attack has repeatedly taken a back seat to the team’s defense, and this year the offense ranks 18th with 344.4 yards per game.

Jim Caldwell, who was hired as quarterbacks coach before the season, will assume Cameron’s duties. Caldwell was head coach of the Indianapolis Colts from 2009-11.

Harbaugh didn’t give a detailed explanation for the move, which came less than 24 hours after the Ravens lost to the Washington Redskins 31-28 in overtime.

“We put 28 points up, so you’re not going to say it’s a reaction to a down offensive performance. It’s not that. I think that’s really important to point out,” Harbaugh said. “It’s what I believe is best going forward for our offense and for our football team.

“Cam was doing a heck of a job here. He was doing a heck of a job here for a long time. Nobody knows that better than me, and nobody has stated that more times. I believe that. I also believe right now at this time, the timing says this is the best thing, and this is what we’re going to do.”

The move comes with the Ravens stuck in their first losing streak since they dropped three in a row in October 2009. Yet Baltimore (9-4) needs only one win to sew up its fifth straight playoff appearance and holds a two-game lead in the AFC North over Cincinnati and Pittsburgh with three games to play.

“I don’t know that staying pat wouldn’t have gotten us there,” Harbaugh said. “What you try to do is put yourself in the best position possible as you see it to be the best football team you can be and then go compete and go see what you can get accomplished.

“Our first goal right now is to secure a playoff berth. Our second goal is to win the AFC North. That’s squarely in our sights. Our next goal is to secure as high a playoff seed as we can. The next goal is to win playoff games, get to the Super Bowl and win that thing. I feel like this is going to give us the best chance to do that.”

Caldwell, 57, was quarterbacks coach for Peyton Manning at Indianapolis before taking over as head coach. He will make his NFL debut as an offensive coordinator on Sunday against the Manning and Denver Broncos (10-3).

“I had an opportunity to talk with (the offense) and really, in a nutshell, I just tried to make them understand that what we’re trying to do is get that much better,” Caldwell said, holding his index finger and thumb about an inch apart. “That’s about it. That’s a difficult task, obviously, trying to get that done in this league. But that’s what we’re shooting for. It’s not a system change. Obviously the Ravens’ offense is the Ravens’ offense. It’s not a philosophical change. John sets the philosophy here of this team and we follow suit.”

Although Harbaugh refused to criticize Cameron, the Ravens’ offense has sputtered at times this season. Baltimore scored touchdowns on three of its first four possessions against the Redskins but managed only seven points after halftime. Fifth-year quarterback Joe Flacco passed for 182 yards and committed two turnovers in the third quarter.

Baltimore’s running game ranks 17th in the NFL despite the presence of Pro Bowl running back Ray Rice, who has topped the 100-yard rushing mark only three times (compared to six times last year). Rice led the NFL in yards from scrimmage in 2011.

Flacco, meanwhile, has been erratic while operating the no-huddle attack and has showed little improvement from a year ago.

“The move was made because it gives us a chance to be the best we can be. It’s just an opportunity to try to get this thing going,” he said. “We feel like it’s what’s best for the team at this time. So that’s why we made the move. There’s nothing more to it than that.”

Flacco has committed pivotal turnovers in the last two games, but those defeats can be attributed heavily to the defense. Two weeks ago, the injury-riddled unit couldn’t stop Pittsburgh Steelers third-string quarterback Charlie Batch in a 23-20 loss, and the Redskins moved downfield rather easily during a beat-the-clock touchdown drive in the waning minutes of regulation.

Cameron, 51, went 1-15 as head coach of the Miami Dolphins in 2007 before being chosen by Harbaugh to run the Baltimore offense. The Ravens made the playoffs in each of his previous four seasons, and under his direction Flacco became the team’s career leader in passing yards, touchdowns and completions.

Harbaugh worked as an assistant coach for Cameron in 1997 at Indiana. After taking over for Brian Billick in Baltimore, one of his first moves was to hire Cameron.

“There is a very human side to this. Cam is my friend, he taught me a lot about coaching, and he is an outstanding coach,” Harbaugh said. “Personally, this is the hardest thing I’ve ever had to do as a coach. Cam has been a significant contributor to all of our successes over the past four, almost five, seasons. Deservedly, he is highly-regarded, and we owe thanks to him for what he did for the Ravens.”

In other news, Harbaugh said injured linebackers Terrell Suggs (torn right biceps) and Ray Lewis (torn right triceps) could return Sunday. Harbaugh described guard Marshal Yanda’s sprained right ankle as “somewhat serious” but not a break.