The 911 caller told police on Monday evening that shots had been fired inside a modest two-story home on Staten Island where a pregnant woman lived with her boyfriend and three children.

Police officers arrived to find a man rushing down the front stairs and quickly took him into custody. He had a gun.

When investigators entered the home’s living room, they found a grisly scene, the police said: The pregnant woman, Ana Desousa, 33, and her longtime boyfriend, Alafia Rodriguez, 46, had been shot and killed. Their 1-year-old daughter, Blue, was found unhurt nearby. Another woman was clinging to life with a gaping chest wound.

A motive for the apparent home invasion and double homicide was not immediately known, the police said. It was the third double homicide in the last month in New York City and occurred as crime ticked up in New York after a brief quiet period during the height of the pandemic.

The Desousa family gathered at a relative’s home on Staten Island Tuesday and struggled to comprehend what had led to the deaths of Ms. Desousa, Mr. Rodriguez and their unborn child.

Neighbors said the couple had recently moved into the house in the working-class neighborhood of Mariners Harbor with two children, aged 9 and 16. Last year, their baby girl was born, and they were expecting another child in July.

“We are just devastated,” Ms. Desousa’s father, Agnelo Desousa, said.

Ms. Desousa’s younger sister, Edna, said the family did not know Mr. Moreno and had no idea why someone would want to kill her sister and her boyfriend.

“We are just trying to lean on each other right now,” Ms. Desousa said. “We are waiting for answers.”

ImageAna Desousa and Alafia Rodriguez.

Ms. Desousa’s family had emigrated from Portugal and settled on Staten Island, where she was born and raised, her father said. She was looking forward to having the new baby, he said.

“She was very excited about the child,” Mr. Desousa said.

A close family friend who identified herself as Tabitha said Ms. Desousa had worked at a nursing home. Mr. Rodriguez was retired from the military, she said.

At around 5:05 p.m. police responded to a call of shots fired inside the two-story single family home on Grandview Avenue, said Assistant Chief Kenneth Corey, the commanding officer of Patrol Borough Staten Island.

As soon as the responding officers arrived, they crossed paths with Mr. Moreno, who was carrying a Ruger .22 caliber pistol, and arrested him, the police said.

“As they were heading up the walkway the house, they encountered an individual,” Chief Corey told reporters at a news conference shortly after the murders.

Moments later investigators found Ms. Desousa and Mr. Rodriguez lying on their living room floor with multiple gunshot wounds, the police said. The third woman, who was not identified, was taken to an area hospital with a gunshot wound to her chest, the police said, and she remained in critical condition on Tuesday evening.

Detectives took the couple’s baby girl to Richmond University Medical Center for a medical evaluation, the police said. It was not clear if the two older children had been at home.

The police had not responded to a shooting with so many casualties since April 11, when two men were shot and killed and a third man was wounded at the corner of East 112th Street and First Avenue in Manhattan, across from the Thomas Jefferson Houses. Then on May 7, two men were fatally shot in the Bronx in another double homicide.

New York City had seen a short respite from violent crime after it was declared the epicenter of the coronavirus pandemic nearly two months ago. Police officials had said stay-at-home orders, which essentially kept residents indoors, had contributed to a decline in most violent crimes.

But over the last few weeks, as the number of coronavirus cases continued to decline and the warm weather drew people outdoors, murder, auto theft and burglary have seen a steady uptick, according to police department data.

Murders, for example, went up 36 percent, from 22 to 30 in the month ending May 3, when compared to the same period a year ago, according to police data.

The killings rattled residents of the blue-collar neighborhood, which is made up of quiet rows of two-story houses near the Mariners Harbor Houses, a public housing development.

Ruth Slayton, 63, a retired surgical technician, said Ms. Desousa and Mr. Rodriguez had only recently moved to the block. In the 29 years she has lived in the neighborhood, she said, “nothing like this has ever happened.”

“This a really quiet neighborhood,” Ms. Slayton said. “It’s a mix of retirees, city workers, construction workers.”

One neighbor, Leroy Francis, 61, said he had seen Mr. Rodriguez outside the house about 20 minutes before the attack. Mr. Francis said the couple was sociable and would sometimes grill outside. The baby girl would often be seen playing in the yard, he said.

“The female, she was friendly. The man kept to his business, just ‘hi, bye,’” Mr. Francis said. “People would come by once in awhile for their barbecues.”

Susan Beachy contributed research. Matthew Sedacca contributed reporting.