A Hofstra University student was killed early this morning in a botched robbery while her twin sister was in the house, cops said.

Andrea Rebello and the armed suspect were shot dead after cops responded to the Uniondale scene, sources and officials said.

Her twin, Jessica, was in the house, where both sisters are believed to have lived.

The masked man busted into the home at California Ave. and Braxton St. at 2:20 a.m., surprising the sisters, one of their boyfriends, and another woman, officials and a law-enforcement source said.

But he wasn’t satisfied with just what was in the house, another source said.

“He said he needed money,” the source said.

So he sent out the third woman, who belongs to a sorority, to get cash from an ATM, sources said.

Instead she called cops.

She told the dispatcher that a man was holding a silver handgun to her friend’s head in a bedroom on the second floor and that there was more than one hostage, according to police radio calls.

Details are still murky, investigators believe the gunman killed Rebello and the cops killed the gunman, a law-enforcement source told The Post.

“We are doing a forensic analysis at the time. We are going to get to the bottom of what happened,” said Nassau County Chief of Detectives Rick Capece, who said a gun was recovered at the home.

Rebello, a public relations major originally from Westchester, blogged about recipes for holiday desserts.

“I’m 100% Portuguese and have an identical twin sister so I guess that makes me kind of unique?” she wrote on her blog’s bio.

Her grief-stricken parents walked into the Nassau County Medical Examiner’s office around 1 p.m. escorted by cops.

The man who dropped them off in a car said: “they’re in shock. … She was a beautiful girl.”

A ring of distraught Hofstra students formed near the shooting scene – and friends of the slain beauty mourned on Twitter.

“Rip Andrea Rebello … god bless her family during these hard times. Rip :(“ wrote Sheridan Campiglia.

Neighbors said they heard several shots after cops arrived.

“We just heard a girl screaming. It sounded like someone was being murdered,” said neighbor Victoria Dehel. “She was screaming ‘No! No! No!’ over and over again.”

Dehel, a student at SUNY Westbury, said she heard four or five shots after cops swarmed the home.

“It was like a movie — it was 100% like a horror movie…Where is the protection?”

Local resident Velma Sangster, who lives two houses away from the shooting, described the victims as “quiet.”

“They were very nice girls. It is so sad.”

The home, located about half a block from Hofstra, is also near an elementary school. Cops closed the elementary school today because of the ongoing investigation. Today is the last day of classes for the university.

“The police investigation is ongoing, and we do not yet know all of the relevant details,” Hofstra University President Stuart Rabinowitz said in a statement. “What we do know is that a young member of the Hofstra family has been taken from us in a senseless act of violence”.

Today was the last day of the spring semester. The commencement is taking place this weekend and will not be rescheduled.

Additional reporting by Lorena Mongelli, Jessica Simeone, Natalie O’Neill and Jamie Schram

[View the story “Friends grieve for Andrea Rebello” on Storify]