FOXBOROUGH — Ray Lewis’s ride will continue on, while the Patriots’ season ended Sunday night when the Baltimore Ravens won the AFC Championship game, 28-13, over New England.

The Ravens avenged a loss last season to the Patriots in the AFC title game.

Lewis, the 17-year veteran linebacker, announced last month that his career would end when the Ravens’ season did. After a wild-card win against the Colts, a two-overtime thriller in Denver, and now the upset of New England, Lewis and Baltimore are headed to the Super Bowl, where they’ll face the 49ers.

Advertisement - Continue Reading Below

It is the first time the Patriots have lost a conference championship game at home, the first time they have watched an opponent celebrate a trip to the Super Bowl on their home field.

And for as much as this Ravens playoff run has seemingly become all about Lewis, the win solidified Joe Flacco as a top quarterback in the NFL – Sunday was his 12th postseason game, 10 of which have come on the road. This was the second straight year he got his team to the AFC title game, and in his fifth season he has led them to the final game of the year.

Flacco was 21 for 36 for 240 yards, three touchdowns and no interceptions and he has yet to throw an interception in these playoffs.

For the Patriots, who were seemingly fielding their most complete team in a few years, with the usual strong offense and retooled defense that got better as the season went on, each group played uncharacteristically poorly.

For Tom Brady and the offense, the problem was not taking advantage of good field position, and curious clock management at the end of the second quarter.

On the defensive side, there were scoring drives of 90 and 87 yards allowed, the second of which, in the third quarter, put the Ravens up for good.

The Patriots got 3 points on their second possession but could not convert a third and 2 at the Ravens 12 to keep things going, and had to take a short field goal from Stephen Gostkowski.

A long punt return by Wes Welker at the end of the first quarter put New England at its 47, and the Patriots went three and out. Another opportunity lost.

And the clock mismanagement at the end of the first half played a role as well.

There were 34 seconds on the clock when Brady found Aaron Hernandez for a 17-yard reception on third down, giving New England first and goal from the 10.

But Hernandez didn’t go out of bounds, forcing the Patriots to call a timeout with 26 seconds to go. Brady scrambled for 3 yards on first, but with the clock running, New England waited too long to call another timeout.

The clock ran down to four seconds and there was no choice but to go for the field goal.

The Patriots went into the locker room ahead, 13-7, though it should have been 17-7.

The Ravens scored three unanswered touchdowns in the second half, taking the lead and control of the game after Bernard Pollard – yes, that Bernard Pollard – once again knocked a key Patriots player out of the game, hitting Stevan Ridley square on the top of his helmet early in the fourth quarter.

Ridley was knocked out immediately and crumpled like a rag doll, losing the ball as he fell. Ravens defensive tackle Arthur Jones, brother of the Patriots’ Chandler Jones, recovered the fumble.

Baltimore got the ball near midfield and scored what turned out to be its last touchdown, though the nail in the Patriots’ season didn’t come until 6:57 of the fourt quarter.

The Patriots, at the Baltimore 24, had a pass batted up by Pernell McPhee, and linebacker Dannell Ellerbe was able to take a couple of steps forward and corral the ball as it came down, and interception that ended the Patriots’ last, best chance.

New England’s first move in the chess match came early in the game. When Brady and Welker couldn’t connect on a downfield pass on third and short, the punt team was brought out, but with a twist: instead of usual punt protector Patrick Chung on the field, it was Ryan Mallett.

Mallett stood behind long snapper Danny Aiken and motioned his teammates into place, and Zoltan Mesko moved up as if he was a fullback.

The Ravens, caught off guard, were forced to burn a timeout. After the timeout, Mallett went to the sideline, Chung came on the field, and Mesko punted.

The Patriots defense forced a quick three and out.

When Brady and the offense returned to the field, they steadily made progress — a 13-yard reception by Brandon Lloyd on third and 2, a 10-yard catch-and-run by Hernandez, a 16-yard pickup by Lloyd. But on a third down deep in Baltimore territory, a quick snap intended to catch the Ravens out of position didn’t work.

Gostkowski put the Patriots on the board with a 30-yard field goal.

The Ravens were first to get a touchdown, in the second quarter, on a 13-play drive during which they faced third down only once, and converted that with a pass to tight end Dennis Pitta.

A few plays later, Flacco got his team into the red zone with a 25-yard connection to Torrey Smith. Smith was covered by Kyle Arrington after Aqib Talib had to leave the game in the first quarter with what the team called a thigh injury.

Ray Rice, who was held to just 31 yards on nine first-half carries, ran the ball in from 2 yards.

Baltimore had started that drive from its 10; being deep in their own half of the field was a familiar spot for the Ravens: their five possessions started inside the 15.

Welker scored with just over four minutes remaining in the half on a 1-yard pass from Brady.