WASHINGTON  President Obama had to get 12 stitches in his lip after getting a blow from an opponent’s elbow during a basketball game Friday morning, White House officials said.

“After being inadvertently hit with an opposing player’s elbow in the lip while playing basketball with friends and family, the president received 12 stitches today administered by the White House medical unit,” the press secretary, Robert Gibbs, said in a statement.

“They were done in the doctor’s office located on the ground floor of the White House.”

A second White House statement, a couple of hours later, said that Mr. Obama was injured when another player turned into the president, “who was playing defense, to take a shot when the elbow hit the president in the mouth.”

That statement did not name the player responsible for the elbow, but it listed several players who were not: Mr. Obama’s nephew Avery Robinson; Reggie Love, an Obama aide who played basketball for Duke University; and Education Secretary Arne Duncan.