New York captures championship No. 27

? Paint the town in pinstripes! Nearly a decade after their dynasty ended on a blooper in the desert, the New York Yankees are baseball’s best again.

Hideki Matsui tied a World Series record with six RBIs, Andy Pettitte won on short rest and New York beat the Philadelphia Phillies 7-3 in Game 6 on Wednesday night, finally seizing that elusive 27th title — the most in all of sports.

It was the team’s first since winning three straight from 1998-2000.

Matsui, the Series MVP, powered a quick rout of old foe Pedro Martinez. And when Mariano Rivera got the final out, it was ecstasy in the Bronx for George Steinbrenner’s go-for-broke bunch.

What a way for Alex Rodriguez, Derek Jeter and crew to christen their $1.5 billion ballpark: One season, one championship.

And to think it capped a season that started in turmoil — a steroids scandal involving A-Rod, followed by hip surgery that kept him out until May.

“My teammates, coaches and the organization stood by me and now we stand here as world champions,” Rodriguez said. “We’re going to enjoy it, and we’re going to party!”

During postgame ceremonies on the field, the big video board in center flashed: “Boss, this is for you.” And commissioner Bud Selig dedicated the moment to Steinbrenner.

About 100 miles south, disappointment.

For Chase Utley and the Phillies, it was a frustrating end to another scintillating season. Philadelphia fell two wins short of becoming the first NL team to repeat as World Series champions since the 1975-76 Cincinnati Reds.

Ryan Howard’s sixth-inning homer came too late to wipe away his World Series slump, and Phillies pitchers rarely managed to slow Matsui and the Yankees’ machine.

“It’s important in our next couple years to stay afloat,” Phillies manager Charlie Manuel said. “I know we can do better.”

In a fitting coincidence, this championship came eight years to the day after the Yankees lost Game 7 of the 2001 World Series in Arizona on Luis Gonzalez’s broken-bat single off Rivera.

New York spent billions trying to get back. At long last, it did.

“We’re looking forward to this parade,” Jeter said.

Hey Babe and Yogi, Mr. October and Joltin’ Joe — you’ve got company. Mark Teixeira, CC Sabathia and a new generation of Yankees have procured their place in pinstriped lore.

And for the four amigos, it was ring No. 5.

Jorge Posada, Jeter, Pettitte and Rivera came up together through the minors and were cornerstones for those four titles in five years starting in 1996.

Now, all on the other side of age 35, they have another success to celebrate. And surely they remember the familiar parade route, up Broadway through the Canyon of Heroes.

Indeed, a New York City-sized party is next. Nine years in the making, with all the glitz and glamour this tony town can offer.

“You never know when you’re going to get back here,” Posada said.

Carrying flags that read 2009 World Series champions, Joba Chamberlain and Nick Swisher led a victory lap around the warning track.

For the 79-year-old Steinbrenner, who has been in declining health, it was the seventh championship since he bought the team in 1973.

Though he stayed back home in Tampa, Fla., he certainly wasn’t forgotten. The grounds crew wore “Win it for The Boss” shirts last week, which were on sale outside the ballpark Wednesday.

New York wasted its chance to wrap things up in Game 5 at Philadelphia, then set its sights on clinching the World Series at home for the first time since 1999.

While nine years between titles is hardly a drought for most teams, it was almost an eternity in Yankeeland.

New York’s eight seasons without a championship was the third-longest stretch for the Yankees since their first one, following gaps of 17 (1979-95) and 14 (1963-76).

Reggie Jackson’s three homers in Game 6 against the Los Angeles Dodgers made the Yankees champs in ’77. On this November night, Matsui delivered a sublime performance at the plate that must have made Mr. October proud.

“It’s awesome,” Matsui said through a translator. “Unbelievable. I’m surprised myself.”

Playing perhaps his final game with the Yankees, Matsui hit a two-run homer off Martinez in the second inning and a two-run single on an 0-2 pitch in the third.

A slumping Teixeira added an RBI single in the fifth off reliever Chad Durbin, and Matsui cracked a two-run double off the right-center fence against lefty J.A. Happ.