One of the victims in Friday’s workplace shooting in Illinois texted his wife as he lay dying to tell her he loved her, the man’s wife said.

Josh Pinkard was one of five people killed at the Henry Pratt warehouse in Aurora by a man who police say opened fire after being terminated. Pinkard, 37, of Oswego, Ill., was the plant manager.

“I received a text at 1:24 from my precious husband that said I love you, I’ve been shot at work,” Terra Pinkard said on Facebook Sunday. “It took me several times reading it for it to hit me that it was for real.”

She said she tried to reach him -- to no avail.

“I called his phone several times, text, FaceTime, nothing,” she said. “I called his plant and a lady answered and said she was barricaded in her room and police were everywhere. Of course, my heart dropped.”

AURORA SHOOTER OPENED FIRE AT TERMINATION MEETING; ONE VICTIM WAS HR INTERN ON FIRST DAY

She said that hours later she was told her husband was one of those who had been killed.

“With my pastor's help, since my family was still on planes to get to us, I told my children their dad did not make it and is in heaven with Jesus,” Pinkard said. “I’ve never had to do something that hard.”

Pinkard said her husband was the smartest person she ever met, her best friend and “the man I would have leaned on during devastation like this.”

"The man who was dying and found the clarity of mind for just a second to send me one last text to let me know he would always love me," she said.

Authorities said Gary Martin pulled out a gun and began shooting after being told he was being fired after 15 years for various workplace violations. Martin, 45, was killed in a shootout with officers.

MORE THAN 1,500 ATTEND VIGIL FOR AURORA SHOOTING VICTIMS

The other four victims were Clayton Parks, Russell Beyer, Vicente Juarez and Trevor Wehner, a 21-year-old human resources intern on his first day on the job.

Five cops were wounded after responding to the scene.

CLICK HERE TO GET THE FOX NEWS APP

More than 1,500 people braved snow and freezing drizzle to attend a prayer vigil for the five victims Sunday in Aurora.

The Associated Press contributed to this report.