The Ravens' only touchdown Sunday against the Buffalo Bills never might have happened if not for a timely decision by quarterback Joe Flacco.

Facing third-and-1 from its 34-yard line, the Ravens offense lined up for a run. Noticing that the Bills' defense was in a “Cover 0” alignment — no defenders deep in the secondary — Flacco switched to a pass play.

Sixty-six yards and several seconds later, wide receiver Mike Wallace crossed the goal line, his touchdown giving the Ravens a 10-0 lead they would hold on to for a 13-7 season-opening win at M&T Bank Stadium.

“It was just part of the plan,” Flacco said. “They were playing Cover 0. They didn't have any safeties there. I have a handful of things I can go to, but I really don't think I checked into that specific thing all week. I thought they might double [wide receiver] Steve [Smith Sr.], but if they did, I wanted to give [Wallace] a chance to really win a matchup.”

On the play, Wallace had lined up to the right of right tackle Rick Wagner. When Buffalo safety Duke Williams moved over to cover him, Wallace saw an opportunity.

“I knew there was a chance,” he said. “On that play, you have a lot of different options. I just got the right coverage. Steve did a great job. He ran across the field, and the safety ran with him. I was one-on-one with the other safety. And if you have a safety on me, he's dead every time.”

Bills coach Rex Ryan, a former defensive coordinator and defensive line coach with the Ravens, accepted blame for the defensive call.

“In that situation, they had three” receivers, Ryan said. “The inside receiver happened to be Mike Wallace, and he made a big play.”

The touchdown pass helped redeem an otherwise uneven showing by the offense. Although Flacco completed 23 of 34 passes for 258 yards, he was sacked four times, and the Ravens drove inside Buffalo's 20 just once before settling for a 37-yard field goal by Justin Tucker in the fourth quarter.

The running game (83 yards on 28 attempts) did not provide much support, either, with Justin Forsett (10 carries for 41 yards) and Terrance West (12 carries for 32 yards) combining to average less than 3.4 yards.

Ravens coach John Harbaugh said he is looking for the offense to become more explosive.

“We need more of these plays,” he said. “We have guys that can do that. We have to improve our passing game, we have to become more precise — protection-wise, timing-wise, throwing- and catching-wise — but we're going to.”

The touchdown might restore Wallace's reputation as a deep threat. In 2014, he had 67 catches for 862 yards and 10 touchdowns for the Miami Dolphins. Last season, he had just 39 catches for 473 yards and two touchdowns with the Minnesota Vikings. The 66-yard catch was his longest since 2012, which was also the last time he had a touchdown reception of at least 60 yards.

“It was extremely big just because I probably haven't had a 50-yard-plus touchdown in three years,” said Wallace, who finished with three catches for 91 yards. “It felt good just to get back to that, just to let them know that we're not dead. A lot of people wrote me off. They don't think I have it, but I've got something for them. I told you all that from Day One. Nothing's going to change. We're just going to keep pounding and pounding and pounding. They better get ready, because I'm coming.”

Wallace, signed to a two-year, $11.5 million deal in March, has speed the offense has missed since Torrey Smith (Maryland) left for the San Francisco 49ers after the 2014 season. Flacco certainly seemed to enjoy watching Wallace fly past Williams and fight his way into the end zone.

“Overall, it was pretty simple, and his speed got the job done,” Flacco said. “It was a really easy throw. Nobody was back there. He did a great job beating the guys with his speed. I think you can see his athleticism because after he ran so well, he was able to stiff-arm the guy and make sure he got into the end zone. Getting in the end zone there is huge because when you get down there, it's not always easy to put it in.”

edward.lee@baltsun.com

twitter.com/EdwardLeeSun