Updated

Mere minutes before the midnight deadline, the Baltimore Orioles agreed to terms late Monday with Florida high school shortstop Manny Machado, the third overall pick in this year's amateur draft.

A deal was reached 3 minutes before midnight, according to scouting director Joe Jordan. Machado received a $5.25 million signing bonus.

"We reached out during the day to try and get some dialogue going and periodically went through it. But again, the meat of this thing happened in the last hour," Jordan said.

The 6-foot-2, 180-pound Machado batted .639 with 12 homers and 56 RBIs in 29 games for Brito Miami Private this season. He also scored 43 runs, hit 27 doubles and stole 17 bases.

"By getting this one done tonight, it caps off what we think is a good draft," Jordan said. "We got the one player that we had to sign. So it's a good finish to it."

The signing bonus fell short of the team record of $6 million bestowed upon catcher Matt Wieters, the fifth overall pick in 2007.

"It's a good deal for the club and the player," Jordan said. "You push buttons at different times, and this one, it kind of played out like we thought.

"We worked really hard on this one as far as trying to figure out where it was going to go and what it was going to take. We just stuck with our guns on what we thought it would be," Jordan said. "They played it to the end. We're very happy."

The No. 3 pick was the Orioles' highest since 1989, when they took pitcher Ben McDonald with the first overall selection.

Jordan said the team would seek to have Machado take a physical this week and perhaps get him started in the rookie-level Gulf Coast League.

"If he's in good enough condition, we'll see if we can extend his season," Jordan said.

Last summer, Machado helped lead USA Baseball's 18 & Under team to a gold medal in Venezuela in the Pan American Junior Championship.

He signed a letter of intent to play at Florida International — just in case negotiations with the Orioles didn't produce his first professional contract.

Earlier on Monday, the Orioles agreed to terms with their seventh-round pick, Matthew Bywater, a left-handed pitcher out of Pepperdine.