SARASOTA, Fla. -- Sensing a need to bolster their middle-infield depth, the Orioles acquired veteran Julio Lugo from the Cardinals in a deal that was made official Thursday afternoon.

"It makes sense for us," Baltimore president of baseball operations Andy MacPhail said of the trade.

"[Lugo] was productive offensively last year, and he's been a productive offensive player. As I said before, he's just a better fit for us right now."

The trade pretty much went down Wednesday afternoon, when Lugo was called into Cardinals general manager John Mozeliak's office and was told his days with St. Louis were numbered. In return for Lugo, the Cardinals will receive a player to be named later, or cash considerations if a player can't be agreed upon.

The trade does makes sense for Baltimore, given that second baseman Brian Roberts has been slowed this spring by a herniated disk in his lower back. The 34-year-old Lugo also provides depth at shortstop, spelling Cesar Izturis, and he is expected to take the roster spot of utility man Robert Andino.

Considered Izturis' primary backup, Andino is out of options and would have to be released or traded if he doesn't make the team's Opening Day roster, which has to be set by 3 p.m. ET on Sunday.

"We still have some moving pieces, and we will see how that shakes out here in the next week," MacPhail said in regards to Andino's future. "[A potential trade] is for your speculation. There are still some balls in the air, as there often are at this time, towards the end of Spring Training."

Andino has appeared in 22 games this spring and started at shortstop Thursday against the Rays in Port Charlotte, Fla. Since utility man Ty Wigginton is considered the team's corner infield backup, MacPhail didn't expect Lugo's acquisition to affect Wigginton's potential playing time.

What Lugo will do is add a level of security for manager Dave Trembley, particularly concerning Roberts. Expected to be the O's Opening Day second baseman, Roberts had played in three consecutive games prior to Wednesday, with no reported issues. But Baltimore's grueling opening schedule -- which includes 16 consecutive games -- dictates the necessity for another middle infielder.

"That was encouraging to see him move around the way he did," MacPhail said of Roberts, who doubled and made several dives in the field Wednesday. "Our medical reports are favorable. I think it's prudent, particularly you are facing three games on the [Rays'] turf and a three o'clock start after a night game, I think it's prudent that we are going to have to pick our spots to make sure he gets adequate rest. And that's another reason where Julio makes sense for us."

While Baltimore's scouts have been looking for middle infielders all spring, MacPhail said Lugo didn't really get on the club's radar screen until several days ago. St. Louis' late-February acquisition of Felipe Lopez left Lugo with an unidentified bench job, a logjam which opened the door for the O's to make an addition.

"All of a sudden, we started to do the math and shifted our focus," MacPhail said. "We were satisfied with the way [Lugo] has played this spring."

Lugo hit .240 in 10 Grapefruit League games despite battling a groin injury. The Cards acquired Lugo in late July from Boston, in exchange for Chris Duncan, and the infielder batted .280 with three homers and 21 RBIs in 88 games.

Cardinals manager Tony La Russa praised Lugo on Thursday, talking about how the veteran came to camp in great shape and said from the beginning that he wanted to win an everyday job. With Brendan Ryan entrenched as the shortstop and Skip Schumaker the second baseman, that was not possible. It's not likely in Orioles camp either, although Lugo figures to get a more regular opportunity to play.

"[The Cardinals] were honest to me," said Lugo, who added that he never requested a trade. "They did everything they told me they were going to do. It didn't work out here. They told me if I get a better situation, they were going to trade me. I'm happy they did it."

Speaking to reporters before the deal was official, Trembley acknowledged the necessity of having a backup middle infielder on whom he can depend.

"I don't think it's about Andino, I don't think it's about anything else," Trembley said. "What you're looking for is to put the best nine guys out there each and every day. That's what it's always about. And the nature of the game is you're always looking to improve your club."

In 10 Major League seasons, Lugo has a .271 batting average (1,213-for-4,473) with 80 home runs and 452 RBIs. In 1,208 games, Lugo has a .965 career fielding percentage.

He's owed $9 million this season, and he has a $9 million vesting option for 2011 that's unreachable because he hasn't compiled the necessary plate appearances since '07. The Red Sox are on the hook for all of Lugo's '10 salary, meaning the Orioles, like the Cardinals, will pay him the league minimum.

To make room for Lugo on the Major League roster, the O's designated infielder Michael Aubrey for assignment.