Everything was fine as of 2:13 p.m. Friday.

Ruben Espinosa got a text from a friend. The two had made a pact to stay in touch when Espinosa moved to Mexico City in self-exile. A news photographer for eight years in Xalapa, the capital of Veracruz state, he had left in early June after being followed and harassed by three men in a state where 11 journalists have been killed just since 2010.

"What's up?" the friend, a fellow photographer, wrote.

"I went out with two people. I ended up staying the night and now I'm going home," Espinosa answered a minute later.

It was the last time anyone heard from Espinosa. He was found tortured and shot to death along with four other victims, all women, Friday night in an apartment in a middle-class neighborhood.

Colleagues feared Espinosa photographs that had angered people in Veracruz brought the retaliation he was running from.

Mexico City's prosecutor said Tuesday that they hadn't rule out any motive for killings, including an attack on a journalist for his work. But he also said robbery of one of the female victims was a line of investigation. He said they are looking for three men shown in a surveillance video leaving the apartment building just 50 minutes after Espinosa's last text.

Even if the attack turns out not to be related to Espinosa's work, his killing has reverberated widely in journalism and human rights circles, reminding them there is no refuge in Mexico, one of the world's most dangerous countries for practicing journalism.

After fleeing to the capital, Espinosa felt he was still being followed. Once, in a restaurant, a stranger approached to ask if he was the photographer who fled Veracruz. It happened again with another stranger at a party.

Espinosa grew up in Mexico City, a place that like many big cities in countries around the globe looks down its nose at provincial cities. But he loved Xalapa, Veracruz's mountainous capital city of government bureaucrats and college students, who made for a volatile mix and plenty of news.

The Gulf coast state is known for producing coffee and oil, being a route for migrants heading for the U.S. and having a strong-armed government whose officials have been accused of colluding with the cartels that move drugs and other contraband through the port of Veracruz city.

Since Veracruz Gov. Javier Duarte took office in 2010, the state has seen 13 of its journalists killed, 11 inside the state, and three more are missing, according to the Committee to Protect Journalists, a U.S.-based advocacy group.

Though no one has ever said the governor was directly involved in that violence, Duarte has been criticized for creating a negative atmosphere for the press. He has accused reporters of being involved in organized crime. His administration jailed two bloggers and threatened to jail a photographer (not Espinosa) for exposing groups of vigilantes in the state.

Duarte's administration also has been quick to blame any killing of a journalist on personal motives. In three of the most high-profile killings of reporters who wrote about corruption, state officials said one was killed in a robbery and blamed another on a personal vendetta. In the third case, they disputed the victim was even a journalist, calling him a taxi driver.

Around the time Espinosa fled the state, authorities reported that another dead journalist, Juan Mendoza Delgado, had been hit by car even though he was missing for several days and was found with a bandage on his head.

It was in this environment where Espinosa worked for the investigative magazine Proceso and photo agencies. He didn't cover drug traffickers or crime, the most dangerous beats for Mexican journalists. His focus was social movements, but he found photographing government crackdowns on protesters proved to be no less dangerous.

It was his coverage of a controversial event that likely led Espinosa to flee. He photographed a June 5 attack on university students by masked men with machetes and baseball bats. A few days later he noticed strange men in front of his house. They took pictures, and once pushed him aggressively. Close friends urged him to leave.

When he arrived in Mexico City, he contacted Article 19, a free press advocacy group, for support during his exile. He and the photographer friend created the informal check-in system for his safety. Lacking trust in authorities after his time in Veracruz, he didn't go to a federal agency set up in Mexico City to help journalists under threat.

He saw a psychologist to help control his fear and anxiety.

After only about a week in Mexico City, Espinosa already missed Xalapa and talked of going back. He loved his life there, the coffee, walking the steep streets with Mexico's highest peak, the Pico de Orizaba, always in view. He missed his cocker spaniel, Cosmos.

But another friend and fellow photographer stopped in Mexico City for a visit and urged Espinosa not to return. He pointed to Mendoza being found dead and to a series of homicides that left 11 people dead in just one weekend.

Espinosa mainly stayed with his family, who live on the outskirts of Mexico City. Occasionally, he would stay with friends when he wanted to be closer to the city's center.

One was Nadia Vera, who came to the capital a year earlier from Xalapa to work as a cultural promoter. She had been an outspoken critic of the Duarte government and was a well-known organizer of protest marches for various causes. She had worked with Espinosa organizing rallies protesting attacks on journalists.

She rented an apartment in the middle-class neighborhood of Narvarte, sharing it with several other young women starting out like she was. One, just 19, was studying to be a makeup artist. Another is thought to have been from Colombia.

About 2 a.m. Friday, Espinosa, Vera and another friend ended up at the apartment, where they stayed up with two roommates drinking beer and talking nearly until dawn. At some point, Espinosa's friend decided to leave. The photographer slept in, waking about 1 p.m. Earlier, the housekeeper had arrived and one roommate left for work.

Espinosa's friend making the security checks had not talked to him since Wednesday, so he sent him a text message at 1:58 p.m.

Espinosa answered a minute later, saying he stayed at Vera's apartment.

"I was up until 6 a.m.," the friend wrote back.

"Me too. Now I have to go to work at AVC," Espinosa responded, referring to the Veracruz photo agency for which he worked some shifts to earn money.

"I'm heading to the street right now," said his last text. It was 2:13 p.m.