A Brooklyn hothead, “infatuated” with his young downstairs neighbor, was charged with murder yesterday after allegedly shooting her and her common-law husband in the lobby of their building, officials and witnesses said.

Manuel Miranda, 59, of 4002 Third Ave., was in custody after allegedly shooting Erica Martinez, 26, and Angel Caraballo, 27, in the first-floor hallway of their Sunset Park building at Third Avenue and 41st Street.

The couple were shot Monday evening as they returned with bags of groceries for their 2-year-old son and two other kids from a previous relationship, neighbors said.

Officials said Martinez was shot in the chest and Caraballo in the neck.

Witnesses canvassing the neighborhood with police helped finger Miranda as he strolled just blocks from the murder site.

Caraballo, a shipping clerk at a Brooklyn sock factory, and Martinez, an office cleaner, were described as hardworking Puerto Ricans who toiled for years to provide a good home for their kids and longed to leave their hardscrabble neighborhood, friends said.

“Angel was almost close to making his dreams come true,” said Caraballo’s pal Jesus Ayala, 21. “He’d been busting his ass for three years, and then this happens.”

Miranda, who had lived in the building for two decades and was described as a hothead and a “horror show” who constantly fought with neighbors, had recently threatened Caraballo, Ayala said.

Neighbors said Miranda lived in the building for years with two grown children.

They said he had recently punched a neighbor in the face and terrified another family who had fled the building after he threatened them with a gun.

Martinez’s brother Hector Cardona, 29, told The Post that Miranda was “obsessed with my sister – or in love with her.”

“He had something for her,” he said. “He had a look in his eyes, but we didn’t see it coming.”

Neighbors yesterday set up a makeshift shrine for the slain couple and said their three heartbroken kids were staying with their maternal grandmother.

“They keep asking; ‘Why didn’t Mommy come home?’ ” Cardona said.

Martinez’s stepfather, Jay Hernandez, 40, told The Post that Miranda was an angry drunk and former drug addict who was “infatuated” with Martinez. He said she feared Miranda might turn violent.

Hernandez said one of Miranda’s sons had warned other tenants about his father. “He said ‘Don’t bother my father. He will kill you,’ ” said Hernandez.