SAN FRANCISCO - After losing to the San Francisco Giants in the World Series, Nori Aoki joined them.

The free agent outfielder agreed Friday to a $4.7 million, one-year contract with San Francisco, a person with knowledge of the agreement said.

The person spoke on condition of anonymity because the deal had not been announced.

Aoki gives the Giants a proven outfielder to join regular centre fielder Angel Pagan and right fielder Hunter Pence om the defending World Series champions. He also has the speed to bat leadoff if Pagan, who has battled injury the past two years, needs a break. He could share time in left field with Gregor Blanco.

Aoki, who sought to join a contender where he could play regularly and liked the Bay Area culture and geographical location to his native Japan, gets a $4 million base salary this year, and the Giants have a $5.5 million option for 2016 with a $700,000 buyout. The option can become mutual, and the deal includes performance bonuses.

Aoki, 33, hit .285 with a home run, six triples, 22 doubles and 43 RBIs over 132 games in his lone season with the Royals after two in Milwaukee. He also stole 17 bases.

In addition, right-hander Yusmeiro Petit agreed to a $2.1 million, one-year contract that avoided salary arbitration. Petit earned $845,000 last season.

Manager Bruce Bochy has said Petit — a talented starter and dominant long man — might remain in the bullpen to begin next season because of his versatility. Petit set a major league record last season by retiring 46 consecutive batters over eight appearances from July 22 to Aug. 28.

Petit entered in the 12th inning of a 2-1, 18-inning win at Washington in Game 2 of the NL Division Series and threw six shutout innings, allowing one hit and striking out seven for the win.

He went 3-0 with a 1.42 ERA in four appearances while pitching in his first post-season. The Venezuelan star became the first relief pitcher to win three games in one post-season while going at least three innings in each appearance and not allowing a run.