TAMPA, Fla. -- For three weeks, Juan Rivera had the inside track to be the Yankees' starting first baseman on Opening Day.

But on the final day of spring training, Rivera became a former Yankee, released in favor of Lyle Overbay, who has been in Yankees camp for all of three days.

"It's the New York Yankees, so you never know," Rivera, 34, said in the clubhouse after manager Joe Girardi delivered the news before the Yankees' final spring training game had even ended.

"I thought I played good enough," to make the team, he said. "That's what they told me."

Rivera was originally signed to compete for a backup outfielder's job. But when it was discovered in early March that every-day first baseman Mark Teixeira had suffered a partially torn tendon sheath in his right wrist while training for the World Baseball Classic with Team USA, Rivera, who played 99 games at first base over the past two seasons for the Dodgers, became the front-runner to be the Yankees' starting first baseman in his absence.

He hit well early in spring training and even lasted long enough to collect a contractually-obligated $100,000 bonus on Tuesday.

But on that same day, Overbay was released by the Boston Red Sox, with whom he had signed in January, and signed to what general manager Brian Cashman called "a three-day NBA-type contract" that afternoon.

Inserted into the game later that night as a defensive replacement for Rivera, Overbay got one at-bat Tuesday night and flied out into a double play. He started Wednesday night against the Orioles in Sarasota and went 2-for-5. And in Thursday's spring training finale against the Pittsburgh Pirates, Overbay again relieved Rivera at first, and got a double in two at-bats.

And that was enough to convince the Yankees that Rivera, who hit .295 this spring but was a question mark defensively, was expendable.

"We're going to keep looking at Overbay," Girardi said.

The Yankees faced a Thursday deadline to add Rivera to the 40-man roster. Rivera would have made $1.2 million if he had made the team.

"We had to make a decision on Juan today, and we just made it," Cashman said.

Overbay will travel to Washington, D.C., for the Yankees' preseason game against the Nationals on Friday, and perhaps to West Point, N.Y., for their final preseason game against Army on Saturday. The likelihood is he will be at first base when the Yankees open the regular season against the Red Sox on Monday at Yankee Stadium.

"I'm just along for the ride to see what I can do," Overbay said.

And Rivera? "I don't know. I have to wait for my agent to call."