Cornerback Patrick Peterson liked the way his team finished off Monday's win. Mark J. Rebilas USA TODAY Sports

Even though the Arizona Cardinals needed a last-second interception to secure a win Monday night, coach Bruce Arians called it an important teaching tool for his team.

"You learn everything that you learn losing by almost losing," Arians said, "and it feels a hell of a lot better."

More from FoxSports

The Cardinals held a seemingly comfortable lead before a missed extra point and a blocked punt forced them to hold on for a 26-18 victory over the Baltimore Ravens. Despite those snafus, it gave Arians a chance to see how his team would hold up in a pressure situation.

"We wanted this type of game and we needed to be in one of these types of games, win it, and kind of exorcise that 'can we win it at the end' type thing," Arians said. "I was very, very pleased with our football team."

Arizona's players had the same mindset after dropping a two-point decision at home to Arizona in Week 4 and unraveling in the second half of a Week 6 setback at Pittsburgh. The Cardinals' three previous wins had come by an average victory margin of 30 points.

"I think this was the first game that we actually finished in the 2015 season," Arizona cornerback Patrick Peterson said. "We were accustomed to doing things like that last year and the two games didn't really work out our way and we finally got one to roll our way."

MORE NEWS: Want stories delivered to you? Sign up for our NFL newsletters.