COLLEGE PARK, Md. — The 44th president of the United States was behind the Oregon State bench Sunday, and Devon Collier didn’t know until it was too late.

As the Beavers forward scrapped and scored inside Comcast Center, he looked downcourt, away from the program’s most famous fan. He didn’t know Barack Obama sat 10 feet away from the team’s huddle. He could laugh afterward, though, because it had been a good night, president or no president.

The Beavers (2-1) had upset Maryland (1-2), 90-83, and Obama had surely seen Collier star, even if Collier hadn’t so much as seen Obama sit.

“To be honest, I was looking for him,” said Collier, who finished with 29 points and 11 rebounds. “I was looking on the other side. I didn’t know he was behind us.”

The Beavers are 4-0 with Obama in attendance, and they seem to have mastered the challenge of playing in the presence of the Washington area’s most powerful man.

In prior road trips east, they had beaten George Washington, Howard and Towson. On Sunday, they were quicker to the ball and better with it. As the Terrapins tinkered with ways of attacking the Beavers’ 2-3 zone, Oregon State was happy to rely on its two stars.

Roberto Nelson finished with 31 points on 9-for-17 shooting, and his late fadeaway jumper, with two Maryland defenders in his vision and a tenuous Oregon State lead in the balance, put the Beavers up five with 29 seconds left. The Terrapins never got any closer.

“I think for basketball players, there’s really a desire to impress the president when he’s in the audience because they know first and foremost that he’s the president,” coach Craig Robinson said. “And he’s a huge basketball fan.”

Entering the game to a standing ovation before nearly 15,000 fans, Obama put his arm around his daughter Malia, 15, as Sasha, 12, and Michelle trailed behind. They walked to a row behind the Oregon State bench as cellphones were shoved into the air, hoping to capture a picture.

When the Beavers toured the White House on Saturday, he’d joked with the team that its first two games – a 78-73 loss to Coppin State, a 79-73 win over Portland – were too stressful for him to bear.

That said, he looked happy to see Oregon State hang with an NCAA tournament hopeful in Maryland, and the Beavers entered halftime even with their hosts.

Then they scored the first eight points in the second half, and the game appeared in decent hands, especially with Nelson getting to the rim as if he had a Secret Service escort. But after a 3-pointer by Evan Smotrycz with less than four minutes left, Oregon State’s lead was down to three, 76-73.

“You could tell, when the game was getting closer,” Nelson said of Obama, “he was on the edge of his seat.”

It kept close until Nelson’s clinching jumper, which made it 86-81. The senior guard had seen Obama in the stands, at one point even getting a nod of acknowledgement. But he did not look over to the president in celebration.