WASHINGTON (WASHINGTON POST) - Ms Julie Hanahan had just checked into the Citadines Las Ramblas, an apartment hotel along Barcelona's famous La Rambla pedestrian mall, when she heard shouting and sirens.
"People were running by and screaming," said Ms Hanahan, who flew to Barcelona from Chicago last week with her husband and two children to board a Mediterranean cruise.
Only seconds before, a van had plowed through pedestrians on the tree-lined thoroughfare, killing 13 and injuring 100. Ms Hanahan's daughter watched the aftermath from her hotel balcony.
"We were on the back of the hotel, thankfully, so she did not witness the van going by," Ms Hanahan said.
But then she, like many other visitors to a destination hit by a terrorist attack, wondered: "Now what? Do we stay in the hotel?"
After a long transatlantic flight, her family was hungry, and the Citadines Las Ramblas did not offer room service. Should they call the US Embassy? Contact their friends at home to let them know they were still alive?
What, exactly, do you do when you're on vacation and terrorists attack?
That's a question experts say you shouldn't ever have to ask, because the answer should be written into your travel plans. In fact, there are several simple steps you can take to ensure you'll remain safe for the duration of your visit in the event that it is disrupted by a terrorist attack.
It could happen to you, warned Mr Charles Goslin, a retired CIA officer and author of "Understanding Personal Security and Risk: A Guide for Business Travelers".
He expects incidents like the Barcelona attack to become more common, as terrorists aim for more soft targets.
"They're going after locations where people congregate in large numbers, such as restaurants and cafes, hotels, resorts, theatres or sports stadiums, or departure areas of an airport," he said.
In the chaos that follows such an incident as the one in Barcelona, or the similar terrorist attack in Nice, France, last summer, it is not always clear what to do.
Ms Wendy Gordon, who was staying at a vacation rental a short walk away from the scene of the Barcelona attack, said she immediately texted her friends and family back in the United States to let them know she was fine.
She also used Facebook's "safety check" feature to tell all her online friends that she had survived the attack.
"I didn't even think to contact the embassy until a friend told me that they were asking US citizens to contact them," said Ms Gordon, a publicist who lives in Washington. She e-mailed the embassy and received a form response with a phone number to call in case of emergency.
Her instincts were good, said Mr Chris Chesak, a spokesman for Redpoint Resolutions, a San Mateo, California, company that offers insurance and extraction services for travellers.
The first priority is staying safe, which Ms Gordon did by returning to her rental and staying there.
"You need to stay as calm as possible, because panicking can make a situation worse and cause poor decision-making," said Mr Chesak. "Stop, assess, and plan your next move to a place of ultimate safety. Then reach out to your local embassy or consulate, as well as loved ones, as you're able."
Another key preventive step is proper planning for an attack.
"Prepare before vacationing," said Mr Pete Canavan, a public safety professional and self-defence instructor based in Kingston, Pennsylvania. "You can mentally prepare for your visit abroad by training yourself to research multiple routes out of the area, noting the equivalent of 9-1-1 and looking for entrances and exits when entering buildings or tourist attractions."
He added: "Avoid large crowds and crowded areas if possible. Stay on the perimeter."
And when you get away, stay away, said Mr John Iannarelli, a retired FBI special agent and author of "How to Spot a Terrorist Before It's Too Late".
"Frequently, terrorists have multiple approaches to an attack," he said. "In Paris, terrorists used guns and then detonated suicide belts. In London, a vehicle was used to ram persons then the driver jumped out and started attacking others with a knife."
He advised agreeing on a meeting place if your group is separated in the aftermath of an incident.
If you're safe, whom should you call? Experienced travellers recommend adding your travel agent and travel insurance company to your list.
A good agent can find you the fastest way out of town, safely. A great agent may even contact you within minutes of the incident, offering options for getting you back home.
"Travel advisers have extensive networks and access to advanced booking tools that can help you see options and make your next moves faster - faster than you could do on your mobile phone, especially if you're under duress," said Ms Erika Richter, a spokesman for the American Society of Travel Agents, a trade group.
Also, call your travel insurance company. The major travel insurance companies maintain a 24-hour hotline for customers. And they field all kinds of questions, not just those related to your policy.
For example, Allianz Global Assistance's hotline can offer guidance for all kinds of issues, ranging from terrorism worries to medical advice if you're in an area with high pollen.
"Every provider will be able to explain your policy's terrorism coverage and may be able to start the claims process immediately," said Ms Carolyn Leckie, a spokesman for Squaremouth, a travel insurance website.
Mr Zak Lee, an engineer from San Francisco who was in Barcelona during the attack, said he relied on first-hand sources for information - in his case, official communications from law enforcement authorities.
"They're almost all in Catalan or Spanish, so Google translate has been my friend there," he said, adding that social media and English-language media were either unreliable or lagged behind the Spanish news sources.
"I think it's important to take cues from the locals," he said. "In this case, a lot of the locals seem to be going about normal business, so I'm carrying on with my trip."
That's what Ms Hanahan, who watched the aftermath unfolding from her hotel window, also did. A hotel representative advised her to stay in the room, and she complied.
After things calmed down, she left the safety of her quarters to find food. "We found a tiny market around the corner that was still open and bought some basics to turn into a make-do dinner in our room," she said.