The Garland cop and the school security guard stood beside each other in the shade through most of the day, trading stories about chasing bad guys and raising kids.

Just before 6:50 p.m., a voice crackled over the radio saying the event they were guarding was over. It had been controversial and dangerous — a cartoon contest sponsored by anti-Muslim activists to see who could make the most outrageous drawings of the prophet Muhammad.

"Looks like we might get out a little early," said the unarmed security guard, a Sunnyvale man named Bruce Joiner.

Joiner had no idea that, at the same moment, court records show, an undercover FBI agent investigating terrorism was sitting in a nearby car, snapping a cellphone photo of him and Garland police Officer Greg Stevens.

An undercover FBI agent's grainy cellphone photo of Garland ISD Security Officer Bruce Joiner and Garland police Officer Greg Stevens, taken from a car 30 seconds before terrorists opened gunfire on the officers on May 3, 2015.

(FBI photo obtained via federal court records )

Seconds later, a black sedan pulled up. Two men with assault rifles jumped out and began shooting. Joiner was struck in the left calf as he ran behind a tree. His wounds marked him as the first ISIS victim on U.S. soil. Stevens returned fire with his service pistol, striking the shooters, Elton Simpson and Nadir Soofi, who both died on the scene.

Stevens became a hero for his actions that day but has said little to nothing publicly about what he did.

Joiner, meanwhile, feels compelled to speak out, traumatized by how close he came to dying.

His torment is exacerbated, he said in a recent interview, by unanswered questions about what truly happened the night of May 3, 2015, at the Curtis Culwell Center. He wonders whether the FBI could have prevented the shooting. He wonders if agents knew he was about to be attacked. He wonders if his own government knowingly let him — and the dozens of other officers and event attendees — be placed in danger.

Garland ISD security officer Bruce Joiner, who was shot by terrorists outside the Curtis Culwell Center in Garland in 2015, at his Sunnyvale home this month.

(Tom Fox/Staff Photographer)

Since August, court records have revealed that the undercover FBI agent was at the scene in close proximity to the shooters. Looking at the evidence, Joiner believes the FBI had some prior knowledge of the plot. That bothers Joiner deeply.

"It's been pretty aggravating to know that there's more to the story," Joiner, 60, said this week. "There was no provision to get unarmed civilians like myself out of harm's way if there was going to be this conflict. So that's very disturbing. That's not the kind of thing we do in the United States with our citizens."

The FBI agent's presence that day was known to Joiner shortly after the shooting. As Simpson and Soofi stepped from their car, the agent, in a car just behind them, drove around them and sped away, the court records show. But he was quickly stopped and detained by Garland police, who apparently didn't know he was a federal agent.

Garland police won't say if they knew anything before the attack. Joiner has requested records about the incident from the Garland Police Department, but the department has denied his request, citing an "ongoing criminal investigation," despite the fact that the two gunmen are dead and a third suspect has been convicted in Phoenix and sentenced to 30 years.

"The case is closed — why is the city of Garland hiding this?" asked Trenton Roberts, Joiner's son-in-law and attorney. "The fact that at the end of the day, you can't get any information out of them does seem a bit like a slap in the face."

Garland ISD Officer Bruce Joiner's lower left leg shows scars of the entry and exit points for a gunshot wound he suffered during the thwarted terrorist attack at Garland's Curtis Culwell Center in May 2015. The photo was taken by Trenton Roberts, lawyer for Bruce Joiner.

In light of the news that an undercover FBI agent was on the scene the day of the attack, several members of Congress are demanding answers from the FBI about its handling of the case. They include Sen. Charles Grassley, R-Iowa, chairman of the Judiciary Committee, and Sen. Ron Johnson, R-Wis., chairman of the Homeland Security and Government Affairs Committee.

If the attack had turned into a massacre, the FBI's handling of the case would be a far bigger scandal, Joiner believes. As it turned out, the terrorists were amateurs, and Stevens was a cool-headed cop and an amazing shot, Joiner said.

President Barack Obama awarded Garland police Officer Gregory Stevens with the 2014-15 Public Safety Office Medal of Valor — the nation's highest award for police — during a ceremony at the White House in May 2016.

(Olivier Douliery/Abaca Press)

But it could have gone much different. The suspects wore body armor. They had six guns and hundreds of rounds. They also carried a photocopied black ISIS flag.

This week's deadly ISIS attack at a concert in Manchester, England, makes it all too clear that authorities need to prioritize counterterrorism efforts, Joiner said. But the FBI also needs to own up to what he believes was a botched undercover operation in Garland that gambled with public safety.

"I want to stop the practice," Joiner said. "If this is the FBI strategy, it's a bad strategy."

In the days after the shooting, the FBI acknowledged that investigators had learned that one of the suspects — Simpson, 30 — might go to the event. Simpson had driven to Garland with the other gunman, Soofi, 34, from their homes in Phoenix. The FBI had investigated Simpson from 2006 to 2014.

Then-FBI Director James Comey said the FBI sent a bulletin to Garland police three hours before the attack warning them that Simpson might show up. But Comey also said he didn't believe Garland police at the scene were aware of the bulletin. Garland police confirmed at the time that officers on the ground didn't know about the warning.

Members of the FBI Evidence Response team box up a rifle and clip as they document the crime scene on May 4, 2015 outside the Curtis Culwell Center in Garland.

(Tom Fox/Staff Photographer)

Members of the FBI Evidence Response team document the crime scene on May 4, 2015, outside the Curtis Culwell Center in Garland.

(Tom Fox/Staff Photographer)

Members of the FBI Evidence Response team document the crime scene on May 4, 2015, outside the Curtis Culwell Center in Garland.

(Tom Fox/Staff Photographer)

The FBI and Garland Police investigate the scene of a shooting on May 4, 2015, at the Curtis Culwell Center in Garland.

(Ron Baselice/Staff Photographer)

Members of the FBI Evidence Response team document the crime scene on May 4, 2015, after two gunmen armed with assault rifles and wearing body armor opened fire on an unarmed Garland ISD security guard outside the Curtis Culwell Center in Garland.

Garland police referred all questions this week to the FBI. The FBI declined to answer questions regarding whether it sufficiently warned Garland police in advance, and instead issued a one-sentence statement.

"There was no advance knowledge of a plot to attack the cartoon drawing contest in Garland, Texas," said Lauren Hagee, a spokeswoman for the FBI's Dallas office.

FBI records show that an undercover agent posing as an Islamic extremist communicated with Simpson about the cartoon contest 10 days before earlier.

Last August, FBI Agent Shawn Scott Hare filed a public affidavit in Cleveland in the case of Erick Jamal Hendricks, who was accused of conspiring to help ISIS by recruiting domestic terrorists in the U.S. To build the case, the affidavit detailed Hendricks' connections to Simpson. Hendricks has pleaded not guilty.

Erick Jamal Hendricks

(Mecklenburg County Sheriff's Office)

The affidavit revealed excerpts of conversations the undercover FBI agent had with Simpson and Hendricks on social media. On April 24, 2015, Simpson alluded to targeting the cartoon contest to the agent. The day before, Simpson had tweeted a link to a story about the contest.

"Did u see that link I posted? About texas?" Simpson asked the agent.

"Tear up Texas," the undercover agent replied.

"Bro, u don't have to say that... U know what happened in Paris," Simpson said, apparently referring to the ISIS-inspired attack that January on the Charlie Hebdo magazine that had published cartoons of Muhammad. "So that goes without saying...No need to be direct."

Elton Simpson

(Les Stukenberg/The Associated Press)

On May 1, two days before the Garland attack, the agent exchanged messages with Hendricks about the cartoon contest. Hendricks suggested the agent could "link with" Simpson. "That's your call," Hendricks wrote, according to the affidavit.

On May 2, Hendricks told an FBI informant at a meeting in the Baltimore area that ISIS wanted to target the cartoon contest in Garland. The FBI informant met with agents "immediately after" the meeting, the affidavit said.

Also that day, the undercover FBI agent and Hendricks exchanged messages about Garland. Typing in code language, Hendricks suggested the agent organize with Simpson and launch a "good solid protest," adding, "At least be heard."

Nadir Soofi

(DMN)

On May 3, the day of the attack, the undercover agent traveled to the Curtis Culwell Center in Garland and messaged Hendricks, saying he was nearby. Hendricks asked a series of questions about the security and media presence, and urged the agent to target the organizer of the event, Pamela Geller.

"If you see that pig make your 'voice' heard against her," Hendricks wrote. He also asked the agent if he was armed, and the agent replied that he had "tools of the trade" and "not a small hand tool."

"Lol," Hendricks replied. "The ppl doing the drawing and hosting and observing are the ones needed to protest against." He seemed to suggest the agent target Geller after the event ended as she held a news conference.

"They will be outside yapping their mouths and thanking the pigs," Hendricks wrote.

***

The shooting has changed Joiner. He has trouble sleeping. He cries more often now, sometimes out of the blue while watching TV. His emotions seem more intense.

He doesn't think he has post-traumatic stress disorder because he can't replay the shooting in his mind. He doesn't remember all of the shooting — his mind didn't record memories during the minute or so when he was trying to survive.

But he can vividly see in his mind Simpson's eerie, evil grin and eye contact with him just before the bullets flew. "It was like the Cheshire cat from Alice in Wonderland," Joiner said. "He was like, 'I got ya.'"

What upsets Joiner most is thinking about what could have happened had Stevens — "forever my hero" — not been as good a shot, or if the terrorists would've been more strategic.

"I could have died," Joiner said. "I could have missed walking my daughter down the aisle. I could have not been there. It's just — wow."