President Barack Obama congratulated Michael Sam on Saturday for being the first openly gay football player taken in the National Football League draft, the White House said in a statement.

"From the playing field to the corporate boardroom, LGBT Americans prove everyday that you should be judged by what you do and not who you are," Obama said. He also congratulated the NFL and the St. Louis Rams, the team that drafted Sam.

Sam, an All-American defensive end who played for the University of Missouri, made history when he was picked by the Rams in the seventh and final round. He was the 249th of 256 players selected.

The 24-year-old got the news by telephone from Rams' coach Jeff Fisher, who told Sam: "You are a Ram. The wait is finally over."

Later, Sam took to Twitter to post a picture of himself, smiling. "Thank you to the St. Louis Rams and the whole city of St. Louis," he said in the post. "I'm using every (ounce) of this to achieve greatness!!"

Photos: Michael Sam's journey 14 photos

Photos: Michael Sam's journey14 photos

Michael Sam's journey – Michael Sam speaks to reporters Wednesday, September 3, after practicing at the Dallas Cowboys' headquarters in Irving, Texas. Sam, who made history as the first openly gay player to be drafted into the NFL, did not make the St. Louis Rams' final 53-man roster, but he was signed by the Cowboys to be on their practice squad.

Hide Caption

1 of 14

Photos: Michael Sam's journey14 photos

Michael Sam's journey – Sam looks on prior to the NFL preseason game between the St. Louis Rams and the Miami Dolphins on August 28. "The most worthwhile things in life rarely come easy, this is a lesson I've always known," Sam tweeted after the Rams released him. "The journey continues."

Hide Caption

2 of 14

Photos: Michael Sam's journey14 photos

Michael Sam's journey – Sam mocks Johnny Manziel's "money" celebration after sacking the Cleveland Browns quarterback during a preseason game August 23 in Cleveland. Sam, a defensive end, had three sacks in the preseason.

Hide Caption

3 of 14

Photos: Michael Sam's journey14 photos

Michael Sam's journey – Sam accepts the Arthur Ashe Courage Award during the 2014 ESPYs on July 16. "Great things can happen when you have the courage to be yourself," Sam said while accepting the award, which is given to those who have shown strength in the face of adversity and stood up for their beliefs.

Hide Caption

4 of 14

Photos: Michael Sam's journey14 photos

Michael Sam's journey – Sam and his boyfriend, Vito Cammisano, kiss in San Diego after Sam was drafted on May 10. Sam was selected by the Rams in the seventh round with the 249th overall pick. Cammisano tweeted a photo of their kiss and said he was "so proud and happy."

Hide Caption

5 of 14

Photos: Michael Sam's journey14 photos

Michael Sam's journey – Sam hoists the Cotton Bowl trophy as the University of Missouri's football team is honored at halftime of a Missouri basketball game February 15 in Columbia, Missouri. Sam was instrumental in leading the Tigers to a 12-win season, an SEC Eastern Division title and a Cotton Bowl victory over Oklahoma State. He was named to many All-American teams, and he was selected as the SEC's co-defensive player of the year.

What Sam means for the NFL

Just Watched

Watch NFL prospect reveal he's gay

St. Louis is only a two-hour drive from Columbia, home of the University of Missouri, where Sam starred.

Besides being a first-team All-American, the 6-foot-2, 260-pounder was named the co-defensive player of the year in the Southeastern Conference, widely considered college football's best league. His fellow Tigers named him the team's most valuable player.

With those credentials, Sam was expected to be selected, but as the three-day draft wore on, there were questions whether he would.

Fisher told ESPN that Sam was a player who was rated by the team as going much higher in the draft.

"We weren't going to miss the opportunity to add an outstanding player to our roster," he said.

In February, Sam came out in interviews with ESPN and The New York Times, a decision that raised questions about whether he had damaged his chances to play in the NFL.

"I came to tell the world I'm an openly proud gay man," he said in an interview with ESPN.

Sam said he told his Missouri teammates in August and suffered no repercussions. He said he was surprised to discover many people in the media already knew he was gay.

"I understand how big this is," Sam said in the ESPN interview. "It's a big deal. No one has done this before. And it's kind of a nervous process, but I know what I want to be ... I want to be a football player in the NFL."

Sam also spoke about his sexual orientation to The New York Times, saying: "I just want to make sure I could tell my story the way I want to tell it. I just want to own my truth."

At the start of the draft on Thursday, it appeared it was also on Sam's mind.

"No matter what happen(s) these next few days, I will always cherish moments like this!!!," he said in a post on Twitter.

Sam's draft was viewed as a barometer of whether the NFL was ready to accept an openly gay player. His selection is viewed as a bright spot for a league that has faced a host of criticism in recent months, from questions about the lack of minorities promoted to the number of players arrested for bad behavior.

"I think this is a good day, against the backdrop of what has happened in the NBA recently," Margaret Hoover, a political commentator and gay rights activist, told CNN.

The NFL Players Association also weighed in on Sam's good news.

"We wish him the best of luck as we do all of the 2014 NFL Draft class," said George Atallah, the association's assistant executive director of external affairs.

Other athletes have come out as gay, but they didn't have Sam's profile. Among them are the NBA's Jason Collins, the WNBA's Brittney Griner, WWE's Darren Young, UFC's Liz Carmouche, MMA's Fallon Fox and Major League Soccer's Robbie Rogers.