NEW YORK -- Greg Maddux, Tom Glavine and Frank Thomas were elected to baseball's Hall of Fame on Wednesday while Craig Biggio fell two votes short and tainted stars of the steroid era remained far behind.

Maddux was picked on 555 of 571 ballots by senior members of the Baseball Writers' Association of America. His 97.2 percentage was the eighth highest in the history of voting.

Glavine, Maddux's longtime teammate in the Atlanta rotation, appeared on 525 ballots and received 91.9 percent. Thomas, the first Hall of Famer who spent the majority of his career as a designated hitter, received 483 votes.

The trio will be inducted in Cooperstown on July 27 along with managers Bobby Cox, Joe Torre and Tony La Russa, elected last month by the expansion-era committee. Maddux and Glavine played under Cox for most of their careers.

"It's exciting for me to go in with my teammate," Maddux said.

Writers had not elected three players in one vote since Nolan Ryan, George Brett and Robin Yount in 1999.

Biggio received 427 votes and 74.8 percent (75 percent is required for enshrinement), matching Nellie Fox in 1985 and Pie Traynor in 1947 for the smallest margin to just miss. Biggio appeared on 388 ballots in his initial appearance last year and appears to be on track to gain election next year.

"Obviously, I'm disappointed to come that close," Biggio said in a statement. "I feel for my family, the organization and the fans. Hopefully, next year."

Mike Piazza was next at 62.2 percent followed by Jack Morris, who was 78 votes short at 61.5 percent in his 15th and final appearance on the writers' ballot. His next chance at Cooperstown could come at the expansion era committee meeting in December 2016.

Roger Clemens (37.6 percent in 2013 to 35.4 percent in 2014), Barry Bonds (36.2 to 34.7), Mark McGwire (16.9 to 11.0), Sammy Sosa (12.5 to 7.2) and Rafael Palmeiro (8.8 to 4.4), who all compiled big numbers but were tainted by the steroid era, each saw his vote percentage drop. Palmeiro will be removed from future writers' ballots after falling to 25 votes and 4.4 percent -- below the 5 percent threshold necessary to remain eligible for next year's vote.

"I wasn't expecting a miracle, but I also wasn't really expecting to be left off the ballot all together," Palmeiro told the Fort Worth Star-Telegram.

"My disappointment started when I tested positive for whatever I tested positive for. I knew it was going to ruin my career, it was going to stain it, so my life changed that day and it's never been the same. I was very proud of my career and what I gave to the game and the way I prepared myself for each game and the respect that I had for baseball itself."

Thomas said he accepts the view of many Hall of Famers that players whose accomplishments are muddied by accusations of steroid use don't belong in the Hall.

"I've got to take the right stance, too. No, they shouldn't get in," he said. "There shouldn't be cheating allowed to get into the Hall of Fame.

"As for what they did, I don't think any of us will ever really know. But I can just tell you, what I did was real and that's why I've got this smile on my face right now because the writers, they definitely got it right."