Nate McLouth, right, singled in the seventh inning and led off the bottom of the first inning with a solo home run in Baltimore’s 6-3 victory vs. Boston on Sunday. (Patrick Semansky/Associated Press)

The Baltimore Orioles are heading back to the postseason for the first time since 1997.

After beating the Boston Red Sox 6-3 on Sunday afternoon in their regular-season home finale, the Orioles sealed at least an AL wild-card spot Sunday night after the the Los Angeles Angels lost to the Texas Rangers, 8-7, in the second game of a doubleheader.

The Orioles were in transit to Tampa Bay for their pivotal three-game series against the Rays, who are also in the wild-card chase. The team’s charter flight was forced to make an emergency landing in Jacksonville after smoke was coming out of the oven in the kitchen area of the plane, but the team reboarded and was on its way after the aircraft was inspected.

With three games remaining in the regular season, the Orioles (92-67) are tied with the New York Yankees for first place in the American League East. The Yankees end their season with a three-game series against the Red Sox.

While clinching a postseason berth is an incredible accomplishment for an Orioles franchise that has suffered through 14 straight losing seasons, the Orioles control their own destiny in winning a division title. Winning all three games in Tampa Bay would at least earn a one-game tiebreaker with the Yankees for the AL East crown Thursday at Camden Yards.

“Our goal now is to figure out a way to play more baseball games here at Camden,” manager Buck Showalter said.

Fans filtered out of the stadium for the final time this regular season. The Orioles retreated to their clubhouse to prepare for their pivotal three-game series in Tampa Bay — unfulfilled.

“There was a chance there [for a special scene],” said closer Jim Johnson, who converted his 50th save. “Now is a time where I think we are paying more attention to the scoreboard, obviously. There’s a lot of different scenarios that could still play out so, like I said, we were going to be doing the same thing the fans were doing so might as well stay out there with them.

“It means a lot to the city. It’s been a long time, and I think it was important.”

The Orioles’ (92-67) larger goal remains. Their win kept them in a first-place tie with the New York Yankees atop the AL East, and they entered the evening just ½ game behind the Rangers for the AL’s best record.

“You’re in, you’re in,” center fielder Adam Jones said. “I don’t care, nobody cares. We can do it at home or we can do it on the plane. We are going to party somewhere.”

Left-handed starter Joe Saunders, who was an Orioles fan growing up in Northern Virginia, did his part to clinch at home, recording his fourth straight quality start — but just his first win in that span — allowing three runs on eight hits with five strikeouts and no walks over 7 1/3 innings.

The Orioles hit three homers off Red Sox pitching, each to lead off an inning. Of the Orioles’ 31 runs over the past four games, 24 of them have been scored by home run.

Left fielder Nate McLouth set the tone early with his third leadoff homer of the year, taking a 2-1 pitch from Red Sox starter Zach Stewart into the left-center field seats.

J.J. Hardy and Chris Davis added solo homers and Jim Thome drove in two runs on a pair of RBI singles against Boston’s shift defense.

Davis’ 31st homer of the season opened the fifth and marked his fifth homer in the past four games. Davis has also homered in four consecutive games, tying Nolan Reimold’s team-high mark set April 13 to 17.

Saunders allowed two homers — Cody Ross’ solo shot to lead off the fourth and a two-run line drive to left by Daniel Nava in the seventh — but the 31-year-old left-hander tipped his cap to acknowledge a standing ovation as he walked off the field with one out in the eighth.

Darren O’Day got the final two outs in the eighth — with a little help from catcher Matt Wieters, who threw out Dustin Pedrioa trying to steal second from his knees — and Johnson tossed a perfect ninth to seal the win.

“We’ve had to fight for everything this year,” Johnson said. “With the way that game finishes up, this [season] is going to come down to the wire. Look at how last year finished, March Madness in September. This game is crazy, you never know what’s going to happen and that’s the way this team has been fighting all year.”

— Baltimore Sun