ST. PETERSBURG, Fla. — It was 8:25 a.m. and Andrew Miller still was asleep when his phone started buzzing Sunday. When he saw the name of Yankees general manager Brian Cashman, Miller knew what to expect.

Cashman informed one of the best back-end relief pitchers in the game that he had been traded to the Indians for four minor-leaguers, including two former first-round picks in outfielder Clint Frazier and lefthanded pitcher Justus Sheffield. Coming six days after the trade of closer Aroldis Chapman to the Cubs, the move signaled a long-rumored Yankees selloff.

“I expected that, leading up to the deadline, the chatter was going to pick up,” Miller said. “I was pretty surprised this morning to get the phone call, but that might have been the fact I was sleeping still. I’m not entirely shocked.”

The Chapman move was a foregone conclusion because he was an impending free agent, but Miller’s situation was uncertain because the Yankees had him locked up on friendly terms through 2018.

What made it sting was that Miller took less to sign with the Yankees because that’s where he wanted to be. “I loved my time here,” he said. “I enjoyed playing in New York, I liked living in New York, I liked the guys here. I’m going to miss that. It’s where I signed up to play.

“It’s certainly a time I will look back on fondly. I wish we would have accomplished a little more. We got to the playoffs last year, but it was still a pleasure playing for the Yankees.”

advertisement | advertise on newsday

Manager Joe Girardi said it was tough to see Miller go, not only because of his ability but because of his positive clubhouse influence.

Dellin Betances inherits the closer role, and Miller and Girardi expressed confidence in him. But Girardi’s job got tougher after the teardown of the back end of his bullpen. Although the Yankees have added major-league relievers Adam Warren and Tyler Clippard, they dealt for seven prospects who are part of a building process that likely will take at least two seasons to produce.

“I don’t look at it that way,” Girardi said. Referring to 2006, when he managed the Marlins’ cheap payroll, he said: “People thought we were going to lose 110 games and we were in the playoff run until the last week. I’m going to give everything I have to this club and expect the same from my players.”

Asked if the Yankees have waved the white flag and surrendered the season, Girardi bristled.

“I don’t ever wave a white flag,” he said. “This organization never waves a white flag. Obviously, we made some trades that people could view like that. I don’t view it as that, and they better not view it in that room as that. Go out and compete, and let’s see where we fall.”