A quiet medical complex near Lake Worth exploded with gunfire on Tuesday when a man fired three shots at a receptionist who refused to date him, then turned the gun and killed himself.

The victim was in guarded condition with bullet wounds to her head, arms and left leg — one apparently was a ricochet shot — after being flown by helicopter to Delray Community Hospital’s trauma unit.

“She’s very lucky,” Palm Beach County Sheriff’s Sgt. William Springer said of Marilyn Acosta, 30, a Lake Worth resident with two children.

Authorities identified her assailant as Enrique Delubian, 36, of Miami.

“She dated him for a short period of time. She went to break it off and he wasn’t happy with that,” Springer said.

The attempted murder-suicide took place shortly before 9 a.m. in the second floor hallway of the Palm Beach Regional Professional Plaza, 2925 10th Ave. North.

Delubian, apparently unfamiliar with which office Acosta worked in, hung out near the courtyard, then crouched by some bushes outside the first floor office of orthopedic surgeon Dr. Jeffrey L. Katzell, a witness said.

“He had a canvas bag and acted very nervous,” said Ann Lederman, a patient of Katzell. Delubian entered Katzell’s office and “asked if Marilyn worked there,” Lederman said.

Told she did not work there, Delubian left and eventually made his way to the second floor internal medicine practice of Dr. Jorge Cestero. Detectives said he got Acosta’s attention, and the receptionist went out into the hallway.

Gunfire followed seconds later.

“I heard four shots. We locked the door to the office,” said Wilma Jean Bittinger, an Atlantis resident who was in Cestero’s office. Bittinger said nurses dialed for help. Patients were told to sit still.

“You don’t want to go out in the hall. You don’t want to see it,” a nurse said, according to Bittinger’s husband, Clay.

When authorities arrived, they found Delubian dead from a single gunshot to his head, possibly through the mouth, from a .357 Magnum.

Detectives think Delubian was using bullets designed for a small handgun, and that may have helped Acosta survive the shooting.

One shot pierced and fractured her skull, hospital spokeswoman Kristin Benz said. Acosta also had bullet wounds to her left thigh and both arms.

The wounds to her left thigh and arm were likely caused by the same bullet, Springer said.