Former Boston reliever Hideki Okajima called it a career on Monday and will throw out the ceremonial opening pitch for the Red Sox against the New York Yankees on Aug. 11.

Okajima, 40, had an invitation to spring training on a minor league contract with the Baltimore Orioles this year, but it did not pan out. The left-hander was let go by the Central League's Yokohama BayStars last season.

"I was going to make the decision (to retire) if things didn't work out in America," Okajima, who returned to Japan in April, told Kyodo News.

Okajima signed with the Red Sox as a free agent in 2007, when he helped them win the World Series alongside fellow Japanese import Daisuke Matsuzaka.

Okajima said his time at Fenway Park from 2007 to 2011 was the most memorable of his career.

"It was the highlight of my entire career, and it's where I wanted to end it," he said.

Okajima played for four different teams in Japan including the Yomiuri Giants, who he started his career with in 1994. The Kyoto native also spent the 2013 season with the Oakland Athletics.

Okajima finishes with a 17-8 record, six saves and a 3.09 ERA in 266 appearances in the majors. In Nippon Professional Baseball, he went 38-40 with a 3.19 ERA and 50 saves in 549 games.