Police said the shooter then apparently shot and killed himself in what was apparently a domestic violence dispute.
The shooting at Emcore Corp. appeared to involve the 37-year-old gunman's ex-wife or girlfriend, police Chief Ray Schultz said. It was not immediately clear whether she was among the dead, or what caliber weapon he used.
"In a situation like this, there are other people in the building and they became, unfortunately, casualties as well," he said.
Schultz said the gunman was a former employee, but did not release his name.
Chaos unfolded as the gunman opened fire, sending employees fleeing for cover as police locked down the entire neighborhood. Police were alerted to the shooting shortly before 9:30 a.m. Five officers were inside the building within three minutes, Schultz said.
Three bodies were initially discovered and a fourth, believed to be the shooter, was also found inside the building.
Police locked down the city's southeast side as a precaution but Schultz said authorities don't believe there was a second gunman. The Emcore complex was surrounded by police cars, many arriving with sirens wailing, as helicopters circled overhead.
Schultz said the gunman had children who live outside Albuquerque and said they were taken into custody by "another agency."
The chief said there was at least one previous domestic violence call involving the gunman but said it occurred outside Albuquerque. He did not say where.
Police said 85 employees were later taken to a community center for interviews with detectives.
Six victims were taken to University of New Mexico Hospital, spokesman Billy Sparks said. One was dead on arrival, one died in the operating room and one was still in surgery but expected to be transferred to intensive care soon.
One of the other three was in the hospital's imaging department and two others were in stable condition in the emergency room.
Emcore manufactures components that allow voice, video and data transmission over fiber optic lines. They also manufacture solar power systems for satellite and ground-based systems.
Based in Albuquerque, the company has about 700 full-time employees.