A man who was fatally shot during a “very violent, intense” confrontation with Salt Lake City police officers on Thursday afternoon had reportedly been acting erratically at a massage school just before the shooting.

Two police officers were injured in the altercation, which began with a report of 39-year-old Michael Bruce Peterson allegedly trespassing at a massage school and harassing employees, Salt Lake City Police Chief Mike Brown said during a Friday afternoon news conference.

Peterson, a prison parolee, was shot in the parking lot of the Maverik gas station parking lot near 300 South and 500 East, which is just down the street from the school.

(Photo courtesy of Utah State Prison) Michael Peterson was shot and killed by police during an altercation on Sept. 28 2017.

He was killed by gunshots after “a very violent situation” in which a stun gun and a baton were used, Brown said.

“This was a very dynamic, very violent, intense encounter,” Brown said.

Witnesses had told The Salt Lake Tribune that the man got hold of an officer’s baton and was hitting him on the head with it. Peterson was shot after other officers arrived.

One of the officers suffered a broken nose, a broken ankle and lacerations, Brown said. A second officer suffered contusions and lacerations. At least some of the injuries were from blunt force trauma, Brown said.

The injured officers were taken to hospital and released later that evening, Brown said.

Peterson died in the Maverik parking lot, sprawled on his back and wearing neon green athletic shoes.

Brown said the situation began about 3:50 p.m. when Peterson entered Healing Mountain Massage School building, 363 S. 500 East, and grabbed a female employee’s buttocks.

Peterson reportedly tried to steal a cellphone from an employee who was calling 911, wandered around the building, which the school shares with other salons, for about 15 minutes and laid down on a table.

Brown called Peterson’s behavior “erratic” and said he didn’t know whether anyone in the building knew him.

Juls Snowden, an employee of Wax Me Too, which is in the same building as the massage school, told 2News that Peterson wandered into her office and lay down on her work table.

Snowden said Peterson’s behavior seemed “child-like,” rather than dangerous.

“He didn’t seem threatening,” she said. “… Just like dealing with a little child. ‘Get out of my office, I’m trying to work here.’”

Officers — responding to a call from the massage school building about a trespasser — confronted Peterson in a neighboring Walgreens parking lot, according to Brown. He declined to detail why Peterson and the police officers moved from the Walgreens down the block to the Maverik.

But a witness, who was shaken by the episode and asked not to be named, told The Tribune that a customer had noticed a man walking down 500 East, with an officer following a few steps behind.

The witness said he saw the confrontation in the Maverik parking lot from across the street.

At the gas station, the man grabbed the officer’s baton and hit him with it, the witness said.

“He was beating up the officer with his own baton,” the witness said.

Two other officers arrived and tried to stop the man’s attack, and that is when the man was shot, the witness said.

Six people who had heard the shots gathered outside the yellow police tape Thursday afternoon. They deliberated on how many shots were fired while they watched shocked witnesses give statements to police officers.

Brown didn’t confirm how many shots were fired or whether more than one officer fired.

One officer has been put on paid administrative leave, Brown confirmed. Another officer is on medical leave.

One of the injured police officers is new to the force, Brown said. The other has more experience and is a “senior, tenured” member of the Police Department, he said.

An employee at the massage school building said Friday that the trespassing call came from there but declined to say more without getting permission from the police to talk.

West Valley City police will handle the investigation, police said.

According to Facebook, Peterson grew up in Orem and went to Orem High School and Snow College. At one time, Peterson was listed as living in Marathon, Fla. Court records indicate that he recently resided in American Fork.

Peterson’s grandmother Margaret Peterson, of American Fork, confirmed that he grew up mainly in the Orem and Provo area.

“Growing up, Michael was just a normal, happy kid, until he reached his early teens,” she told The Tribune. “Then he got involved with some people that were on drugs, and I guess he thought that was an easy route to go.”

In 1997, Peterson was sentenced to a stay in the Utah State Prison — where he spent a decade behind bars — after pleading guilty in Provo’s 4th District Court in two drug distribution cases and after a jury found him guilty of attempted murder and evidence tampering in another case.

According to court records, Peterson was sentenced in 1997 to a five-years-to-life prison term in the attempted murder case and one to 15 years for evidence tampering. A judge ordered the sentences to run concurrent to each another.

Peterson was 18 years old at the time of the attempted murder charge, which stemmed from an incident in 1996.

Court records provide few details about the offense, noting that the attempted murder charge was enhanced because the crime was “committed with a firearm on or about school premises.”

Prison officials said Friday that since 2007, Peterson has been in and out of prison due to several parole violations.

“He just couldn‘t seem to get off the drugs and stay off them,” his grandmother said. “He’d call and tell us, ’I’m never going to do this again. I’ll show you. I’ll change,’ and yet he’d do the same thing and go back to prison.”

In 2009, he pleaded guilty to failure to stop for police, a third-degree felony, in Utah County and was sent back to prison.

Most recently, he was at the prison for a parole violation from March to August of this year, according to prison officials.

In August, he was paroled to the Fortitude Treatment Center in Salt Lake City, but his grandmother said he was caught using drugs and was sent back to prison for a month.

The last time she spoke to him, Margaret Peterson said, was about a week and a half ago. He was due to be released from prison to a halfway house Tuesday.

Then, on Thursday, police came to her door to tell her he’d been killed.

“We don’t know what caused him to do what he did,” she said. “We’re just glad the police officers weren’t injured any more than they were and that they’re home and doing better.”

She’s anxious to find out toxicology results from the med examiner, “so that we can have some closure.”

Margaret Peterson told 2News that on several occasions he vowed never to go back to prison, saying that “he would rather be dead.”

In their conversations, Margaret Peterson said her grandson — a father of two — would tell her and her husband that he loved them and was grateful for everything they’d done for him.

To anyone struggling with drug addiction, Margaret Peterson said, “please, please, please get help. Don’t end up like this.”

Her grandson’s death was the third shooting by Salt Lake City officers this year.

On Aug. 13, Salt Lake City police shot and killed 50-year-old Patrick Harmon after he allegedly pulled a weapon on officers who were trying to arrest him on an outstanding felony warrant. The shooting occurred about 10:20 p.m. at 1002 S. State Street.

On May 30, Roman Jade Carrillo, 18, of Bountiful, was fatally wounded during an exchange of gunfire with two Salt Lake City police officers — an episode that followed an unrelated shooting in downtown Salt Lake City and a high-speed car chase that ended in Tooele County.

— Tribune reporters Jessica Miller, Luke Ramseth and Mariah Noble contributed to this story.

Correction: Oct. 27, 1 p.m. >> An earlier version of this story misstated where one of the 911 calls came from. Calls came from the building occupied by Healing Mountain Massage School, not from the school itself.