The man who shot and killed 49 people at a gay nightclub exchanged text messages with his wife during the attack, according to evidence presented to a jury Wednesday.

Noor Salman, the wife of Pulse shooter Omar Mateen, is on trial in federal court for aiding and abetting her husband and with obstruction of justice, for lying to federal agents. If convicted, she could get life in prison.

Mateen was shot and killed by police after the June 2016 attack.

At 4:27 a.m., during a standoff with police more than two hours after Mateen first opened fire inside the Orlando nightclub, Salman texted Mateen, twice asking, "where are you?" The exchange happened about the time local authorities woke her up with a phone call, asking her to exit their apartment. The couple lived about two hours south of Orlando with their child.

"Everything ok?" Mateen replied.

The Orlando Sentinel reported from court that Salman responded, reminding her husband that he had work the next day. His mother was "worried and so am I," she wrote. Mateen responded: "You heard what happened".

"????" Salman replied. "What happened?!" As Salman texted, Mateen's mother called him twice. He didn't answer. "Omar call me ... I am so worried," she said in a voicemail. "Please call me."

By the time he and Salman were trading texts, as jurors saw earlier in the trial, Mateen had already gunned down club-goers throughout Pulse with an AR-15-style rifle, tracing a methodical and bloody path as wounded patrons fled, hid and called for help.

"I love you babe," Mateen wrote in his last text message at 4:29 a.m.

"Habibi what happened?!" Salman wrote, using an Arabic term of endearment. "Your mom said that she said to come over and you never did."

Jurors on Wednesday also saw evidence of Mateen's online activity prior to the attack. Prosecutors showed searches on his smartphone for the Islamic State group, violence in the Middle East, other acts of terrorism and places to get guns.

In conversations with an Orlando police hostage negotiator, Mateen would later claim his attack June 12, 2016 attack at Pulse nightclub was "triggered" by the May 6 death of Abu Waheeb, an Islamic State leader in Iraq.

However, under questioning by Salman's defense, FBI agent Kim Rosecrans said Mateen's internet visits also included dating sites and a link about masturbation. Those entries, defense attorney Charles Swift said, "don't suggest Mateen was sharing his phone much with his wife."

Prosecutors hope to rest their case by Thursday morning. Her defense plans to call eight to 10 witnesses, and then the case will go to the jury.