Ron Hopper, FBI assistant special agent in charge of the Tampa Division, speaks during a news conference on the shooting investigation at the Pulse nightclub in Orlando. (Drew Angerer/Getty Images)

On the day of his rampage at a gay nightclub, the Orlando shooter posted messages on Facebook pledging allegiance to the leader of the Islamic State and vowing that there would be more attacks in the coming days by the group in the United States, according to a letter sent to Facebook on Wednesday by Sen. Ron Johnson (R-Wis.), chairman of the Senate Homeland Security Committee.

“America and Russia stop bombing the Islamic state..I pledge my alliance to [Islamic State leader] abu bakr al Baghdadi ..may Allah accept me,” Omar Mateen wrote, according to the letter, which requested Facebook’s assistance in the investigation into the shooting that resulted in 49 deaths.

Mateen then posted, according to the letter: “The real muslims will never accept the filthy ways of the west” and “You kill innocent women and children by doing us taste the Islamic state vengeance.”

At some point on Sunday, Mateen also searched on Facebook for “Pulse Orlando” and “Shooting,” according to Johnson.

The social media postings corroborate accounts that Mateen was motivated in part by a perceived connection to the Islamic State. The shooter made 911 phone calls during the shooting in which he pledged allegiance to the leader of the Islamic State, although he also apparently mentioned the Boston Marathon bombers.

The FBI investigated Omar Mateen twice before he killed 49 people at the Pulse nightclub in Orlando. (Jason Aldag/The Washington Post)

FBI Director James B. Comey said earlier this week that there were no signs that Mateen was directly tied to any kind of network, and he added that it remained unclear exactly which extremist group he supported. Mateen’s references to terrorist groups have at times been muddled. Officials say he made comments in recent years to co-workers claiming he had family connections to ­al-Qaeda and was a member of Hezbollah, two opposing terrorist groups that have clashed repeatedly in Syria.

Mateen also apparently used Facebook in May to look for information on the terrorists behind the 2015 San Bernardino attack. On June 4, 2016, he searched “Baghdadi Speech,” according to Johnson’s letter.

Authorities continued Wednesday to seek answers about the gunman who carried out the shooting rampage here, expanding the investigation to include interviews with his relatives, friends and anyone else who may have had contact with him in the months before the attack.

Mateen had smoked marijuana, used steroids and been expelled from high school in the ninth grade for fighting, according to records dating to last year obtained by The Washington Post.

He said he had been convicted of a crime, placed on probation and had a criminal conviction sealed or expunged. He did not specify the offense.

He said he spoke excellent Farsi and good Arabic. The email address he listed using:

Asked why he had never served in the U.S. military, Mateen said that he “wanted to stay close to family.”

Reached by telephone Wednesday evening, Mateen’s mother, Shahla Mateen, said she knew nothing of her son’s plans.

“No. Nothing. Nothing,” she said.

Mateen said “we” — she didn’t specify who else — were out of town and got back late last week.

“Friday I didn’t see him and just Saturday,” she said, before she stopped talking and hung up the phone.

A man later answered Shahla Mateen’s phone. He did not identify himself.

“We want to have our own life back again,” the man said. “We have a loss, and there are a lot of disasters and a lot of bad news and because of it and we don’t have a life.”

While the FBI said it views the shooting as a hate crime as well as an act of terrorism, officials said there were “no impending charges” in the case and declined to discuss whether any were forthcoming.

The FBI confirmed that it had interviewed the wife of Mateen, who was 29. Noor Z. Salman urged her husband not to do anything the night of the attack, said one U.S. law enforcement official. But the bureau also tried to play down this element of the investigation, saying it was part of the larger work of piecing together the gunman’s movements and motivations.

“With respect to the wife,” Ronald Hopper, an FBI assistant special agent in charge, said Wednesday, “that is only one of many interviews we’re doing.”

Salman has not publicly commented on the attack, and she has not been seen since Monday night, when the Miami-based television station WSVN recorded video of the 30-year-old being escorted from her home in Fort Pierce, Fla. Her face was shrouded by the hood of her sweatshirt, and her left hand had what appeared to be a silver wedding band.

Former neighbors in Salman’s home town of Rodeo, Calif., an area of oil refineries about 25 miles northeast of San Francisco, have described her as a shy and sheltered woman.

Jesus Torres, who attended middle school and high school with Salman, described her as quiet and smart, someone who hung out with the smart kids. He has remained in touch with her family since graduating from high school in 2004, and said he believed they were worried about her but did not want to pry. A neighbor told the Mercury News that Salman’s “mother would always complain” that Mateen never let his wife visit her family.

Salman’s romance with Mateen began online, and they were married on Sept. 29, 2011, in an Islamic ceremony in Hercules, Calif., a town near Rodeo, according to friends and public records. The couple have a 3-year-old son.

Jasbinder Chahal, who has lived across the street from Salman’s childhood home for the past 15 years, told the Associated Press that Salman did not appear to have lofty ambitions beyond marriage after graduating from high school in 2004.

“You know, some kids after high school, they open up the box and the world is theirs,” Chahal said. “She was inside the box — just pack it up and get married.”

She added: “Noor never played in the street, and the girls were never allowed to drive.”

The family lives in a beige split-level home with rose bushes out front in a neighborhood that is ethnically diverse and middle class. Many of the immediate neighbors are of Indian descent.

Mohamed Diouf, 23, went to the same high school with Salman’s cousins Sana and Salam. Diouf described them as straight-A students — “a couple of the smartest ladies I’ve ever met.”

Diouf added about their mother: “She raised two successful, intelligent daughters that I got to grow up with, and I kind of respect that. I feel she’s someone to respect. The family is someone to respect.”

Diouf describes them as mainstream in their Muslim faith. He also grew up in a Muslim household.

“They’re like my parents — my mother and father, devout Muslims. It’s Ramadan right now. They would be fasting, they would be praying. They would wear their hijabs sometimes. But they were just regular people.”

On Wednesday, the family was holed up inside their home all day, with the shades drawn. Multiple visitors came and brought food and other household goods.

Salman accompanied Mateen at one point to buy ammunition and went with him on at least one trip to Pulse described as “reconnaissance” not long before the shooting, according to officials familiar with the investigation who spoke on the condition of anonymity to discuss the ongoing probe.

Whether she knew the purpose of that trip remains unclear.

Investigators are still working to corroborate what Salman told them during interviews, according to authorities, and will also try to determine if she suffered any abuse at the gunman’s hands. His first wife — Sitora Yusifiy, to whom he was briefly married in 2009 — said he beat her repeatedly while they were married. How authorities ultimately view Salman’s role and actions could change if she was a victim of abuse or feared for her life, officials say.

As investigators continue probing Mateen’s life, they are also scouring digital forensics and are trying to reconstruct his actions dating back months. Meanwhile, evidence technicians were methodically tracing the path of the barrage of bullets that flew inside Pulse as they attempted to diagram precisely what happened.

“We’re looking at everything,” Hopper said.

He also said authorities had found no evidence yet that Mateen intended to target any other locations, and officials said they had no information about any possible surveillance at Disney or any knowledge of Mateen patronizing clubs besides Pulse.

At least two witnesses at Pulse said Mateen had previously visited the club. President Obama, who is traveling to Orlando on Thursday, has called the shooting “an act of terror and an act of hate,” while FBI Director James B. Comey said authorities were working to see if anti-gay sentiment played into the decision to attack the club.

Mateen appeared to be a very skilled shooter, according to documents released Wednesday, repeatedly scoring high marks on tests needed to obtain firearms licenses.

After opening fire on scores of people inside the nightclub here early Sunday, Mateen then threatened to strap explosives to his hostages and left police fearing possible booby traps even after the attacker was killed, the city’s mayor said Wednesday.

No explosives or bomb vests were found, but suspicions of possible devices forced authorities to wait a “significant time” before entering the club and fully assessing the mayhem after a commando-style raid freed survivors and killed the gunman, said Orlando Mayor Buddy Dyer.

Since Sunday’s attack, authorities have confronted a jumble of potential leads and loose ends. Among the unanswered questions were why an earlier FBI investigation into the gunman was closed two years before the shooting and whether Sunday’s slaughter at the popular gay club was an act of politically driven rage or triggered by personal demons — or even a mix of both.

Meanwhile, German investigators examined a Düsseldorf bank account held by Mateen’s father, who has claimed that his son visited him at his home in Port St. Lucie, Fla., the day before the attack and showed no hints of anger or anxiety. Germany’s Rheinischen Post reported that Mateen’s Afghanistan-born father, Seddique Mateen, posted the bank account details in a 2013 video soliciting donations — receiving only two payments totaling the equivalent of about $200.

There was no immediate indication of how the money was used, but the elder Mateen has been active in the Afghan expatriate community in the United States and elsewhere as a self-proclaimed political figure and analyst.

Survivors of the attack have relayed some of Mateen’s comments during the standoff with police officers, offering clues to his motivation.

One witness said that during the hostage standoff that followed the shooting spree, Mateen claimed he carried out the attack because he wanted “Americans to stop bombing his country.” While Mateen’s parents are from Afghanistan, he was born in the United States. Another witness said Wednesday that Mateen said, “America needs to stop bombing ISIS in Syria.”

The FBI said Wednesday that Mateen made phone calls during the standoff, but it has not publicly released any additional information on these calls.

Mateen made at least one phone call to an acquaintance he knew from Florida, two U.S. law enforcement officials said, but it is unknown what Mateen told this person.

Mateen’s phone has been recovered, and forensic experts were about to access the data, an official said.

Berman and Nakashima reported from Washington. Adam Goldman, Jennifer Jenkins, Sarah Larimer, Brian Murphy and Julie Tate in Washington; Emily Badger in Rodeo, Calif.; and Zachary Fagenson in Port St. Lucie, Fla., contributed to this report.