A captain of the St. John’s University men’s lacrosse team stabbed and nearly gutted his roommate during a scuffle, police said Wednesday.

The dust-up began when Matthew Stockfeder, 21, apparently woke his roommate up by playing loud music in their off-campus Queens apartment late Monday night, according to law-enforcement sources.

Matthew Stockfeder, 21 (RedStormSports.com)

The roommate, Justin Corpolongo, 23 — a 2018 university alumnus who used to play on the lacrosse team — told Stockfeder to shut off the tunes, sources said.

So Stockfeder booked it to a home two blocks away on 172nd street around 73rd Avenue in Flushing to hang out with his teammates who lived there.

But the captain repeatedly texted Corpolongo, apparently prompting the rival to show up to the house, police and sources said.

The two men squared off, and the victim tried multiple times to punch Stockfeder, according to a criminal complaint unsealed in Queens court Wednesday afternoon.

At one point, the victim was holding Stockfeder’s head down when he suddenly “felt a sharp pain to his abdomen,” the complaint states.

He “looked down to see that he was bleeding profusely” — and realized he’d been stabbed.

Corpolongo was rushed to NewYork-Presbyterian Hospital in Queens, where doctors determined that a 4- to 5-inch puncture to his small intestine was likely caused by a knife, the complaint states.

He needed surgery but was expected to survive, according to the complaint.

The lacrosse player surrendered to police with his lawyer Wednesday morning.

Police interviewed four people in the house at the time of the brawl, sources said.

Stockfeder, a senior from Melville, LI, was ordered held on $5,000 bail by a Queens Criminal Court judge. His lawyer, Anthony Como, did not immediately return a phone call.

St. John’s said in a statement that it was aware of the incident and cooperating with authorities.

Click for more from NYPost.com