The gunman who carried out a shooting rampage in Orlando, Florida, Sunday exchanged text messages with his wife on the day of the attack, according to a U.S. law enforcement official, communications that are being looked at as part of a sprawling investigation scrutinizing the gunman as well as his digital footprint.

The messages exchanged with his wife were among several ways he communicated with the outside world on the day he opened fire inside Pulse, a gay nightclub, a rampage that ultimately left 49 people dead and dozens more injured.

Orlando Mayor Buddy Dyer said Friday morning that he was not sure about what was discussed in the text messages. CNN, which first reported the messages, said the gunman had texted his wife about two hours after the gunfire asking if she had seen the news and that at one point, she texted him that she loved him.

The FBI also revealed Friday that a gun store where the shooter went a month earlier had been alarmed about him and told federal agents, but this store had no identifying information and no apparent way for the bureau to realize he was the same man they had looked into on two prior occasions.

Meanwhile, it is not clear what impact the text messages exchanged on Sunday could have on a decision about whether authorities may bring charges against the gunman's wife. After the Boston Marathon bombing in 2013, investigators focused attention on the wife of one of the bombers to see what she may have known about the plot.

Days after the attack, the FBI made public photos of Tamerlan Tsarnaev and his younger brother, Dzhokar, identifying them as the suspects in the bombing. Tamerlan exchanged text messages with his wife, Katherine Russell, after the photos came out, according to former U.S. law enforcement officials. Russell also fed the Tsarnaev brothers dinner at some point after the attack, the officials said. Tamerlan was eventually killed during a frenzied shootout with police, while Dzhokar was captured and, last year, convicted and sentenced to death.

In 2014, FBI agents aggressively pushed for charges to be brought against Russell, whom investigators believed had possibly made false statements and concealed knowledge of a crime. (These are the same charges brought against a friend of the man accused of shooting nine black parishioners in a Charleston, South Carolina, church last year; the friend pleaded guilty earlier this year)

Federal prosecutors interviewed Russell several times after the bombing, but in the end, they declined to bring charges against her, according to officials familiar with the situation. Prosecutors had concerns about jury nullification -- which is when jurors acquit someone despite believing them to be guilty -- and whether any of her interactions with her husband after the bombing constituted a spousal privilege.

Omar Mateen, the 29-year-old gunman in Orlando, posted on Facebook about the Islamic State on the day of the attack, according to Sen. Ron Johnson, R-Wis., chairman of the Senate Homeland Security Committee.

In a letter to Facebook seeking its help, Johnson wrote that Mateen had pledged allegiance to the group's leader, claiming that the shooting was "vengeance" for airstrikes and vowed that further attacks would follow. Facebook is cooperating with the FBI, according to a person familiar with the investigation.

Johnson's letter also said that Mateen had used Facebook to search for and post information both before and during the attack, which began with a barrage of gunfire at 2 a.m. on Sunday. After that first burst of gunfire, Mateen held hostages in the building until police stormed the club at 5 a.m. and killed him in a shootout.

During this three-hour window, Mateen searched Facebook for news about "Pulse Orlando" and "Shooting," according to Johnson. He also used his phone to make multiple calls, according to the FBI. Hopper said that while he could not discuss the nature of the calls, "I can confirm there were phone calls made, we have them."

At least two of the calls were made to a 911 dispatcher, who then called Mateen back, FBI Director James Comey said. Mateen pledged loyalty to the leader of the Islamic State during one of these calls. In addition, Mateen called a television station during the standoff and, according to an official, called at least one other person.

Mateen had four or five Facebook accounts, and his postings on Facebook pledging loyalty to Islamic State were made within minutes of the initial shooting rampage, according to an individual familiar with the investigation.

In an echo of the attacks in San Bernardino, California, where one of the husband-and-wife attackers similarly used Facebook to post a pledge on behalf of the couple, the gunman went on the social network on Sunday to pledge loyalty to Abu Bakr al-Baghdadi, the emir of the self-proclaimed Islamic State.

"America and Russia stop bombing the Islamic state. I pledge my alliance to abu bakr al Baghdadi..may Allah accept me," Mateen posted, according to Johnson's letter, which requested Facebook's assistance in the investigation.

He then posted "The real muslims will never accept the filthy ways of the west" and "You kill innocent women and children by doing us airstrikes..now taste the Islamic state vengeance." In a final post, Mateen apparently wrote, "In the next few days you will see attacks from the Islamic state in the usa."

Johnson also wrote that a month before the attack, Mateen had used Facebook to search for information on the San Bernardino attackers. A little over a week before the shooting, Johnson said, Mateen searched Facebook for "Baghdadi Speech." He had also used Facebook for "frequent local law enforcement and FBI searches," Johnson said, which included looking for specific offices belonging to law enforcement.

While authorities say they believe Mateen was radicalized, they are sifting through a host of factors in the investigation, including his pledges of loyalty to the Islamic State; prior claims he made about other, opposing militant groups; the possibility that anti-gay sentiment motivated his attack; and the added fact that witnesses say they had previously seen him on gay dating apps and at the club.

Comey has said that investigators have not found signs that Mateen was directly tied to any kind of network, though he added that it remained unclear exactly which extremist group the attacker supported. In his remarks to 911 and over the years, Mateen has claimed some ties or connections to opposing groups.

Mateen had been on the FBI's radar twice before, Comey said earlier this week. Agents investigated him for 10 months beginning in 2013 and then contacted him again the following year as part of a different probe. In both cases, Mateen was interviewed before agents moved on.

On Friday, the FBI revealed that without realizing it, someone had unwittingly flagged him for agents a third time just months before the shooting. When FBI agents spoke with employees at a gun store in Florida in May, these workers mentioned "an individual who had been in the store days earlier asking about a specific type of body armor," the bureau said in a statement Friday.

The workers at Lotus Gunworks told the agents that they did not get this person's name or any contact information before sending him elsewhere, since they did not carry that type of body armor, the bureau said.

After the shooting Sunday, the gun store's employees contacted the FBI again to tell them "that the unknown individual who had visited their store in May resembled the Pulse shooter," the bureau said. "Unfortunately, given the lack information about this individual, FBI agents were unable to conduct any meaningful investigative follow up."

A day before the FBI's statement, Robbie Abell, co-owner of Lotus Gunworks, told reporters that when Mateen came to the store, a salesman "got very concerned" when Mateen asked about body armor and "had a conversation in a foreign language" on his cellphone. Mateen also asked about bulk ammunition, he said.

"We no link, no contact, we didn't know who he was, but we did contact authorities and let them know we just had a suspicious person that was in here," the co-owner said. (The FBI said its agents were told about the person asking about body armor when they contacted Lotus about "an unrelated investigative matter.")

In Orlando, the city continued to grapple with the aftermath of the rampage. Orlando Regional Medical Center, which has treated most of those injured, said Friday that six people were still in critical condition after the shooting. Three others were in guarded condition, while more than a dozen were stable.

Surgeons at Orlando Regional had conducted more than 50 operations since the shooting, with more expected Friday.

Dyer, speaking at a news conference on Friday, said he was unsure if every person killed in the shooting would be buried in Orlando, even as he said they were working to collect funds to help the victims and their families.

While more funerals and memorials are planned in Orlando, police also said that the Westboro Baptist Church had announced plans to come to the city to protest on Saturday.

President Barack Obama visited with relatives of those slain and survivors of the attack on Thursday, saying that he and Vice President Joe Biden told them "that our hearts are broken, too, but we stand with you and that we are here for you, and that we are remembering those who you loved so deeply."

According to Dyer, who met with Obama, the president said it was the 15th time he has traveled to a scene like Orlando after a mass attack.