SAN FRANCISCO (AP) — Ryan Howard took a good-natured jab at those fickle fans in baseball-crazy Philadelphia.

"Hopefully there's no riots taking place back in Philly," he joked of his new megadeal.

Get used to it, City of Brotherly Love. This guy's going to be around for a while.

The slugging first baseman agreed to a $125 million, five-year contract extension Monday that could keep him with the Phillies until 2017.

Howard preferred securing his future in Philadelphia to testing free agency in two years — and boy, is he getting his payday. He also felt loyal to the franchise that gave him his chance to reach the big leagues, saying, "That wasn't a very hard decision."

"I tell you what, it's a great feeling to have that security and know where you're going to be," Howard said. "I feel what I've been doing over the last couple of years, I feel pretty confident that down the road, I'll be right where I want to be and still doing the same things."

Howard's teammates wasted no time hitting him up for favors, either.

"Where we going to eat, Ryan?" Ben Francisco asked.

Howard just chuckled.

"He's going to take all your money," quipped Shane Victorino.

Even general manager Ruben Amaro Jr. got into the fun.

"As part of this deal, he has agreed to buy a second home for me," Amaro joked during a news conference at AT&T Park, where the Phillies opened a three-game series with the Giants.

But in all seriousness, Amaro pulled off a deal that keeps the centerpiece of the Phillies' offense in place for the long haul.

"We just felt it was good timing for us," Amaro said. "We felt No. 1, he's one of the elite offensive players in the game. We could have waited another year and a half or so and dealt with it later on, but the fact of the matter is we decided he is that important to our organization and to our club and to our future."

The 30-year-old Howard will make $20 million each in 2012 and 2013 and $25 million annually from 2014-16. The Phillies have a $23 million club option for 2017 with a $10 million buyout. Howard also receives a limited no-trade provision: He can select nine teams each year he can be traded to with his consent.

"This is a very good contract for him," Howard's agent Casey Close said. "The reason he felt the time was right was he loves his teammates, he loves the city. He wanted to be a part of something special for a long time to come."

Howard flied to deep center in the first inning Monday, with Andres Torres going to the wall to make the tough catch. Howard, a two-time All-Star, led the Phillies to two straight trips to the World Series, winning a championship in 2008.

The $25 million guaranteed average salary in the extension will be baseball's second-highest behind Alex Rodriguez's $27.5 million average under a 10-year contract with the Yankees running through 2017.

Howard was happy to land a new deal now and avoid the craziness that would have come once he was eligible for free agency after the 2011 season, when he will be 32.

All-Star right fielder Jayson Werth was thrilled for Howard, but uncertain how this might affect his chances of staying put in Philly beyond this season. He has had preliminary discussions with the team about an extension, but said, "I think they've been busy with Ryan."

Werth is making $7 million this year, the final season of his $10 million, two-year contract.

"This is all so fresh. I haven't given it much thought yet," Werth said. "I think it's awesome. He definitely deserves it. Look at the type of seasons he's put together and the player he is. He's one of the premier players in the game. At the end of the day, I've got to go out there and hit. I'm happy for Ryan and the organization. It's a good thing, a step in the right direction."

Amaro said Howard's contract is structured to give the club flexibility to keep players like Werth and shortstop Jimmy Rollins. Rollins' $8.5 million club option for 2011 was exercised in December. The 2007 NL MVP is making $7.5 million this year, the final season originally guaranteed under the $40 million, five-year extension he signed in June 2005.

"Actually we'd like to keep all those guys," Amaro said. "Hopefully we can keep this group together."

After being briefly stuck in the minors while Jim Thome manned first for the Phillies, Howard was the 2005 Rookie of the Year at 25, the same age A-Rod signed his first free-agent deal — $252 million with Texas in 2001.

Howard, the 2006 NL MVP, is earning $19 million this season as part of a $54 million, three-year deal that pays him $20 million in 2011.

He signed that deal in February 2009, avoiding a potentially contentious arbitration hearing.

"This is absolutely great," manager Charlie Manuel said. "We signed Ryan Howard quite a few years ago and that means we're keeping him. He's one of our guys, he is a Phillie. It's big for our team. That's what you set out for. He's very worthy of it. He is a great player and he is going to continue to be a great player for a while. Everything about it's good."

Howard hit .279 with 45 homers and 141 RBIs last season and entered Monday's game with three homers and 16 RBIs in 80 at-bats this April.

While he has put up monster numbers, averaging 49.5 homers and 143 RBIs over the past four years, he has averaged 191 strikeouts over that span.

In addition, he has committed himself to a rigorous fitness and training routine in recent years. He even reached out to Barry Bonds this winter and ended up working for about a week in Florida with the home run king — "one of my idols growing up."

"Ryan has clearly dedicated himself to being a very complete player," Amaro said. "He's worked on his defense. He's worked on his body. He has a special attribute with his power and his run production that not many in the history of this game have been able to accomplish. ... The numbers don't lie. He's also one of the most durable players we have. Ryan's basically ready to play 162 games. I think that means a lot."

Howard's deal could influence Derek Jeter's next deal with the Yankees and Albert Pujols' next contract with the Cardinals.

Jeter, who also is represented by Close, is in the final season of a $189 million, 10-year contract.

Pujols is making $16 million this year, and St. Louis has a $16 million option for 2011 with a $5 million buyout. Of the 2011 salary, $4 million would be deferred without interest.

Howard isn't worried that he could be one-upped by those guys down the road.

"Whatever the other guys get, hey, that's great, that's fine, that's dandy," Howard said. "You don't play this game for money. You play this game to come out here and win championships. Yeah, we get paid a lot of money to do what we do."

Twins MVP catcher Joe Mauer signed a $184 million, eight-year extension this spring.

"It allowed us to see how the market was shaping up," Close said of 28-year-old Mauer's deal.

Said Amaro: "He kind of set the market for himself by his performance. It's something that he deserves."


AP Sports Writers Ronald Blum and Howie Rumberg in New York contributed to this story.