A Stony Brook University basketball player pleaded not guilty Thursday to third-degree rape and two lesser charges.

Blair Mendy, 22, a sophomore from San Jose, California, is accused of having sexual intercourse with someone younger than 17 years old. He is also charged with sexual misconduct and endangering the welfare of a child, both misdemeanors.

Suffolk prosecutors asked that Mendy be held on bail of $50,000 cash, said district attorney’s office spokesman Robert Clifford. But First District Court Judge Pierce Cohalan set bail at $2,000 cash or bond.

It was unclear Thursday afternoon if Mendy had posted bail.

University police arrested Mendy on Wednesday. A law enforcement source said the arrest came after an investigation showed he had sex with a 16-year-old girl on Dec. 20 in his dorm room, two days before his 22nd birthday.

His attorney, Camille Russell of Westbury, did not respond to requests for comment.

advertisement | advertise on newsday

If convicted, Mendy faces a maximum of 1 1⁄3 to 4 years in prison.

Mendy’s father, of Palo Alto, California, told Newsday on Wednesday that he did not know about the arrest and could not believe the charges against his son.

Stony Brook basketball coach Jeff Boals said in a statement: “As a team, we must continue to strive to be at our best at all times and take responsibility for our actions, both on and off the court. The coaching staff and I work hard to bring that message home at every opportunity. I am committed to these young men and to helping them achieve their athletic and academic goals.”

The Stony Brook sophomore had been captain of his high school basketball team during his junior and senior years, according to his webpage with the Stony Brook Seawolves team. He has played two Seawolves games so far in the school year, his game statistics show.

Mendy became the fourth player from the men’s basketball team to be arrested in the last 10 months.

In October, the team’s top returning player, projected starting guard Ahmad Walker, 23, of Port Washington, was suspended from the team after being charged with second-degree harassment, a violation, and resisting arrest, a misdemeanor, on Sept. 10, 2016.

In April, shortly after Stony Brook made its first appearance in the NCAA Division I Tournament, against Kentucky, senior forward Rayshaun McGrew and sophomore guard DeShaun Thrower, who has since transferred to another school, were charged with third-degree grand larceny and third-degree criminal mischief.

In a statement, Stony Brook Athletic Director Shawn Heilbron said Mendy’s arrest was disappointing.

advertisement | advertise on newsday

“The behavior of individual students does not represent or define our athletic program,” Heilbron said. “It was very disappointing to learn that one of our student athletes was arrested. We take this very seriously and will follow and adhere to the policies and procedures that are in place for all Stony Brook students.”

Walker and McGrew’s cases are pending. The status of Thrower’s case could not be immediately determined.

Mendy is due back in court March 6.