Former Tigers player Ivan Rodriguez, left, sits with Detroit Tigers first base coach Omar Vizquel before an interleague baseball game against the Colorado Rockies, Saturday, Aug. 2, 2014, in Detroit. Rodriguez was honored before the game for his time in Detroit.

NEW YORK (AP) — Ivan Rodriguez, Jeff Bagwell and Tim Raines were elected to baseball’s Hall of Fame on Wednesday, earning the honor as Trevor Hoffman and Vladimir Guerrero fell just short.

Steroids-tainted stars Barry Bonds and Roger Clemens were passed over for the fifth straight year by the Baseball Writers’ Association of America. But they received a majority of votes for the first time and could be in position to gain election in coming years.

Rodriguez, at 45 the youngest current Hall member, received 336 votes (76 percent) to join Johnny Bench in 1989 as the only catchers elected on the first ballot.

“”I’ve been having trouble sleeping for three days,” the popular Pudge, who once played for the Detroit Tigers, said. “Johnny Bench was my favorite player growing up.”

Bagwell, on the ballot for the seventh time after falling 15 votes short last year, received 381 of 442 votes for 86.2 percent. Players needed 75 percent, which came to 332 votes this year.

“Anxiety was very, very high,” Bagwell said. “I wrote it on a ball tonight. It was kind of cool.”

In his 10th and final year of eligibility, Raines was on 380 ballots (86 percent). He started at 24.3 percent in 2008 and jumped from 55 percent in 2015 to 69.8 percent last year.

“Last night probably the worst night I’ve had out of the 10 years,” he said. “I knew I was close, but I wasn’t sure.”

Hoffman was five votes shy and Guerrero 15 short.

“Falling short of this class is disappointing,” Hoffman said in a statement. “I am truly humbled to have come so close. I hope to one day soon share a Hall of Fame celebration with my family, friends, teammates and all of San Diego.”

Edgar Martinez was next at 58.6 percent, followed by Clemens at 54.1 percent, Bonds at 53.8 percent, Mike Mussina at 51.8 percent, Curt Schilling at 45 percent, Lee Smith at 34.2 percent and Manny Ramirez at 23.8 percent.

Players will be inducted July 30 during ceremonies at Cooperstown along with former Commissioner Bud Selig and retired Kansas City and Atlanta executive John Schuerholz, both elected last month by a veterans committee.

Bagwell was a four-time All-Star for Houston, finishing with a .297 batting average, 401 homers and 1,401 RBIs. Among 220 Hall of Fame players, he is the 50th who spent his entire career with one big league team.

Raines, fifth in career stolen bases, is just the fifth player elected in his final year of eligibility after Red Ruffing (1967), Joe Medwick (1968), Ralph Kiner (1975) and Jim Rice (2009). Raines was a seven-time All-Star and the 1986 NL batting champion.

Raines hit .294 with a .385 on-base percentage, playing during a time when Rickey Henderson was the sport’s dominant speedster. He spent 13 of 23 big league seasons with the Montreal Expos, who left Canada to become the Washington Nationals for the 2005 season, and joins Andre Dawson and Gary Carter as the only players to enter the Hall representing the Expos.

Rodriguez, a 14-time All-Star who hit .296 with 311 homers and 1,332 RBIs, was never disciplined for PEDs but former Texas teammate Jose Canseco alleged in a 2005 book that he injected the catcher with steroids. Asked whether he was on the list of players who allegedly tested positive for steroids during baseball’s 2003 survey, Rodriguez said in 2009: “Only God knows.”

Rodriguez displaced Pedro Martinez as the youngest of the record 74 living Hall members.

Bonds, a seven-time MVP who holds the season and career home run records, received 36.2 percent in his initial appearance, in 2013 and jumped from 44.3 percent last year. Clemens, a seven-time Cy Young Award winner, rose from 45.2 percent last year.

Bonds was indicted on charges he lied to a grand jury in 2003 when he denied using PEDs, but a jury failed to reach a verdict on three counts he made false statements and convicted him on one obstruction of justice count, finding he gave an evasive answer. The conviction was overturned appeal in 2015.

Clemens was acquitted on one count of obstruction of Congress, three counts of making false statements to Congress and two counts of perjury, all stemming from his denials of drug use.

A 12-time All-Star on the ballot for the first time, Ramirez was twice suspended for violating baseball’s drug agreement. He helped the Boston Red Sox win World Series titles in 2004 and ’07, the first for the franchise since 1918, and hit .312 with 555 home runs and 1,831 RBIs in 19 big league seasons.

“Barry Bonds was the best player I played against in my entire life,” Bagwell said.

Several notable players will join them in the competition for votes in upcoming years: Chipper Jones and Jim Thome in 2018, Mariano Rivera and Roy Halladay in 2019, and Derek Jeter in 2020.

Twelve players have been elected by the BBWAA in the past four years, the most over a span of that length since the first four ballots from 1936-39.

Lee Smith, who had 478 saves, got 34 percent in his final time on the ballot. Jorge Posada, Tim Wakefield and Magglio Ordonez were among the players who got under 5 percent and fell off future ballots.

Pete Rose, the career hits leader who has never appeared on a ballot because of a lifetime ban that followed an investigation of his gambling, received one write-in vote.