The decision to charge her is not without risks for prosecutors. If the case goes to trial, prosecutors will have to contend with a jury that could be sympathetic to Ms. Salman, who said she was in an abusive relationship and living in fear.

In an interview last year with The New York Times, Ms. Salman said she was “unaware of everything” in connection with the attack.

Ms. Salman said she had accompanied her husband to Orlando with their child once when he scouted the club but did not know the purpose of the trip. On the day her husband drove to Orlando, she claimed he said he was going to visit a friend, named Nemo, who lived in Florida. But Nemo was not living in Florida at the time, a fact Ms. Salman said she did not know.

She also said she had no reason to suspect that ammunition he bought in the days leading up to the attack was to be used in the shooting, given that her husband was a security guard who frequently purchased ammunition. On the day of the shooting, she bought her husband a Father’s Day card, expecting him to return that evening. Her lawyers believe that supports her story that she did not know about the attack.

During his rampage, Mr. Mateen used Facebook to pledge his allegiance to the Islamic State. President Obama has said that Mr. Mateen “took in extremist information and propaganda over the internet and became radicalized.”

Federal investigators do not believe that Mr. Mateen, who was 29 and who was killed by the police after the shooting, received any specific training or support from the Islamic State. Part of their inquiry has focused on whether anyone in the United States assisted in his plans for the attack.

There has perhaps been no figure more central to those questions than Ms. Salman, who grew up in an avocado-colored home in Rodeo, Calif., near San Francisco. In Rodeo, on a diverse block populated by Chinese, Indian, Korean and Mexican families, neighbors recalled a younger Ms. Salman as warm and kind.