NEW YORK — Matt Harvey’s season is over and he’s “relieved” to have a reason for why it was so horrible.

The former ace will have surgery for thoracic outlet syndrome, sidelining the New York Mets pitcher until next year. The team said Friday the operation will be performed in St. Louis by Dr. Robert Thompson, but didn’t announce a date.

“I’m extremely disappointed to learn that I’ll be out for the season, but I’m relieved to have answers and get back to doing what I love,” Harvey posted on Twitter. “I hope you’ll understand if I stay out of touch & stick to the business of getting healthy.”

Thoracic outlet syndrome is caused by the compression of nerves, blood vessels or both in the area between the neck and armpit. It’s a serious condition that has interrupted and even jeopardized the careers of other major league pitchers.

The surgery, which involves the removal of a rib, is designed to alleviate pressure on the affected nerves or blood vessels. Thompson, a TOS specialist, has performed similar operations on pitchers such as Jaime Garcia and Chris Young that helped them make successful returns to the mound.

Harvey went 4-10 with a 4.86 ERA in 17 starts this season, and his final win came on May 30. He permitted 111 hits in 922/3 innings, with 76 strikeouts and 24 walks.

It was a stunning flop for a pitcher who began the year 25-18 with a 2.53 ERA and 449 strikeouts in 427 major league innings.

ALL-STAR GAME: The Mets’ Bartolo Colon and the Nationals’ Max Scherzer are headed to the All-Star Game, replacing fellow national league pitchers Madison Bumgarner of the Giants and Stephen Strasburg of the Nationals.

Major League Baseball also announced that Blue Jays outfielder Michael Saunders and Giants first baseman Brandon Belt won the final two All-Star roster spots, elected by fans in online balloting. Boston’s Dustin Pedroia was fourth among five choices in the AL voting.

ATHLETICS: Outfielder Coco Crisp was suspended for one game for intentionally throwing his bat toward home plate umpire D.J. Reyburn.

The bat hit Reyburn’s foot after Crisp struck out to end the fifth inning of Oakland’s 3-1 victory Thursday night at Houston. Crisp was ejected.

PIRATES: Pittsburgh brought up highly touted first base prospect Josh Bell from Class AAA Indianapolis.

The switch-hitting 23-year-old was hitting .324 with 13 home runs and 53 RBI in 83 games.

PADRES: San Diego agreed to terms with 17-year-old Cuban pitcher Adrian Morejon, pending a physical. The left-hander led Cuba’s 15-under league with 113 strikeouts in 68 innings in 2014. Last year, he pitched in several Cuban leagues.