SAN FRANCISCO -- All-Star Game MVP Melky Cabrera was suspended for 50 games without pay Wednesday after the San Francisco Giants outfielder tested positive for testosterone.

Cabrera leads the National League with 159 hits and is second in batting average behind Pittsburgh's Andrew McCutchen. Cabrera's penalty is the first for a high-profile player since last year's NL MVP, Ryan Braun, had his suspension overturned by an arbitrator last winter.

Major League Baseball said Cabrera tested positive for the banned performance-enhancing substance in violation of the drug agreement between owners and the players' association.

"My positive test was the result of my use of a substance I should not have used," Cabrera said in a statement released by the union. "I accept my suspension under the Joint Drug Program and I will try to move on with my life. I am deeply sorry for my mistake and I apologize to my teammates, to the San Francisco Giants organization and to the fans for letting them down."

Cabrera is batting .346 with 11 home runs and 60 RBIs in his first season with San Francisco.

"Ultimately, it was just a bad decision," catcher Buster Posey said.

Flashing bright orange spikes, Cabrera singled and hit a two-run homer last month in the NL's 8-0 All-Star win, which secured home-field advantage for the World Series.

He will miss the final 45 games of the regular season and serve the remainder of the suspension at the start of next season or during the postseason, depending on whether the Giants make the playoffs and how far they advance.

"We were extremely disappointed," the Giants said. "We fully support Major League Baseball's policy and its efforts to eliminate performance enhancing drugs from our game."

If the Giants wanted him to become active in the middle of a playoff series, they would have to play a man short from the start of the series until the suspension ends because rosters can't be altered midseries.

"It happened, and now we move on," right fielder Hunter Pence said. "I know the program and I know they test us, and if we test positive, we get a suspension. That's what happened. And now we play with what we've got."

It was not immediately known whether Cabrera's positive test occurred before the All-Star Game. The union initially filed a grievance, which would have caused the case to go before an arbitrator, but then dropped it, a person familiar with the process said. The person spoke on condition of anonymity because that detail was not announced.

Manager Bruce Bochy broke the news to his team in a meeting about 90 minutes before the start of a 6-4 loss to the Washington Nationals.

"Melky, he was hurt by it," Bochy said. "It's obvious he was disappointed."

Cabrera told CSN Bay Area on July 27 that he had been tested for performance-enhancing drugs the previous week, although it's unknown whether the test he referenced resulted in the positive test.

Drug-testing labs check urine for its ratio of testosterone to epitestosterone, which usually is 1 to 1 in adult males. If the lab notices any abnormality, it conducts an isotope ratio mass spectrometry (IRMS) test to determine whether the testosterone is exogenous, or came from outside the body.

Cabrera will not be permitted to work out with the Giants at any point during his suspension. Under the terms of Major League Baseball's drug policy, he can work out at the Giants' minor league complex but can't play in any minor league games.

Cabrera became the second Giants player to receive a drug suspension this season. Reliever Guillermo Mota was penalized for 100 games in May, becoming just the third major league player disciplined twice for positive drug tests. Mota is eligible to return Aug. 28, barring rainouts, and began a minor league rehabilitation assignment Tuesday with the Giants' rookie team in Arizona.

Robinson Cano, Cabrera's former teammate on the Yankees, was "100 percent surprised" by the news.

"It's really sad. He's having a great year," Cano said. "But, I'm his friend and I'm gonna be there for him."

There have been four suspensions in the major league drug program this year, with Philadelphia infielder Freddy Galvis and free-agent outfielder Marlon Byrd also suspended 50 games apiece. There have been 70 suspensions under the minor league drug program.