Background: The home in Philadelphia, Pennsylvania, where authorities say the shooting occurred (WPVI/YouTube). Inset: Jackson Roberts (Philadelphia Police Department).

A university student in Pennsylvania is accused of shooting a man in the neck in a home filled with friends and "smiling" as he gripped the gun.

Jackson Roberts, 22, has been charged with attempted murder, aggravated assault, possession of an instrument of crime with intent, simple assault and recklessly endangering another person, according to Philadelphia County court records reviewed by Law&Crime. He is lodged in the Curran-Fromhold Correctional Facility on a $2 million bond.

On Monday at about 9 a.m., Roberts was at a home in the 900 block of West Dauphin Street in northern Philadelphia, the Philadelphia Police Department said. He's a student at Drexel University, according to his LinkedIn profile and a confirmation by the school to local ABC affiliate WPVI.

The defendant was at a friend's house with several other people, and alcohol and drugs — including cocaine and ketamine — were reportedly flowing.

According to the outlet, a woman there said she was in the living room of the home with Roberts and her boyfriend, the soon-to-be victim. She recalled that she turned to put a fork into a sink when she heard a gunshot.

Roberts had allegedly taken a gun out of a fanny pack and shot the other man once.

When the woman turned back around, she saw Roberts "smiling while holding the gun" and could see it smoking, according to her account. She said she also saw Roberts lowering the gun and her boyfriend falling backward.

No one else in the home saw the shooting, according to authorities, though two witnesses said they saw Roberts holding the gun just after hearing the shot.

Someone called police, and officers arrived to find Roberts standing alone in the home's backyard. He was detained, and he reportedly said he didn't remember anything.

The police department told Law&Crime that officers also found the victim suffering from a gunshot wound. He was brought to a nearby hospital and listed in "stable condition."

According to the Philadelphia County District Attorney's Office, the victim has a fractured vertebra in his neck and a projectile is still lodged inside; he could have permanent mobility issues. He is not a student at the university.

Police recovered a .45-caliber handgun from the kitchen counter. They have not announced a suspected motive for the alleged attack.

Drexel University told WPVI that it "is taking measures consistent with its policies and is cooperating with law enforcement."

Roberts had a preliminary arraignment on Tuesday. He is expected to return to court for a preliminary hearing on Nov. 20.