ESPN analyst Jessica Mendoza says pitcher Mike Fiers should have gone to Major League Baseball before he told a journalist about his allegation the Houston Astros had been using a camera to steal signs.

Mendoza, a New York Mets adviser in addition to her media job, said Thursday on ESPN’s “Golic and Wingo” that Fiers should have kept the information confined to teammates and the league. The right-hander spent 2 1/2 seasons with the Astros, including their 2017 championship season. He signed with Detroit in 2018 and was traded to Oakland — Houston’s AL West rival — later that season.

“To go public with it and call them out and start all of this, it’s hard to swallow.” –@jessmendoza on former Astros pitcher Mike Fiers revealing the Astros sign-stealing scheme. pic.twitter.com/LSQY6B0dSC — Golic and Wingo (@GolicAndWingo) January 16, 2020

“Going public, yeah. I get it, if you’re with the Oakland A’s and you’re on another team, heck yeah you better be telling your teammates, ‘Heads up, if you hear some noises while you’re pitching, like, this is what’s going on.’ For sure. But to go public, yeah, it didn’t sit well with me,” Mendoza said on the broadcast. “Honestly, it made me sad for the sport that that’s how this all got found out.

“This wasn’t something MLB naturally investigated or that even other teams complained about because they naturally heard about it and investigations happened,” she added. “But it came from within. It was a player that was a part of it, that benefited from it during the regular season when he was a part of that team. That, when I first heard about it, it hits you like any teammate would. It’s something that you don’t do. I totally get telling your future teammates, helping them win, letting people know, but to go public with it and call them out and start all of this, it’s hard to swallow.”

Fiers went public in a report last November by The Athletic. That prompted baseball’s investigation, leading to one-season suspensions for Astros general manager Jeff Luhnow and manager AJ Hinch, who were fired Monday. Boston manager Alex Cora and Mets manager Carlos Beltrán also lost their jobs — Cora was Houston’s bench coach in 2017 and Beltrán a player. MLB’s investigation implicated both.

Mendoza tried to clarify her remarks in a statement posted to Twitter later Thursday, saying baseball will benefit from the sign stealing being uncovered and that appropriate action was taken.

“The point I should have been much more clear on was this: I believe it’s very critical that this news was made public; I simply disagree with the manner in which that was done,” Mendoza said in the statement. “I credit Mike Fiers for stepping forward, yet I feel that going directly through your team and/or MLB first could have been a better way to surface the information. Reasonable minds can disagree.”

Mendoza has been an ESPN analyst since 2015 and part of the “Sunday Night Baseball” booth since 2016. She has been an adviser to the Mets and general manger Brodie Van Wagenen since last March.

“Jessica was speaking as an ESPN analyst, not as a spokesperson for the Mets when she made her comments,” Van Wagenen said during a conference call. He added that he did not have a chance to speak with her yet.

When asked last year about whether her dual roles would cause friction, Mendoza said during a conference call that she considers herself an analyst first.

“I hope they hired me because of my honesty and criticism, not just the good things,” she said. “On the air I would be the same even if I was in front of them.”

The Los Angeles Dodgers banned her from their clubhouse once during the season and once during the postseason because of her position with the Mets, ESPN said.

Mendoza’s comments about Fiers were less critical than remarks by others. Former Astros manager Phil Garner said on a Houston radio show that Fiers was considered “a rat” for his role.

“If it is a big deal, how come you didn’t do it while you were with the Astros? Why didn’t you step up and stop it,” Garner said. “You are going to enjoy the fruits while you were the Astros? That’s not a very good standard.”

MLB Network radio analyst CJ Nitkowski took an opposite view.

“Mike Fiers could have easily done this anonymously, then it only would have been a column and likely ended there because good reporters don’t give up sources. He put his name on it and the game is better today because of it. He’s not a target, he’s to be commended,” Nitkowski wrote on Twitter.