Katie O’Gara had a whole day planned for her mom when she came to visit O’Gara on her semester abroad in London.

The two women were headed to see some of the city’s most famous attractions when they got lost on the London Underground before heading to Big Ben. Their train pulled into the Westminster station at 3 p.m., but if they had arrived 20 minutes earlier, they might have found themselves in the middle of Wednesday’s attack outside Parliament.

“They told us that the station was closed and we couldn’t get out. I said, ‘Wow that’s really weird, something must be wrong,’ ” O’Gara, 21, of West Islip, said. “It would be like going into Manhattan and having Penn Station randomly closed.”

Minutes earlier, a sport utility vehicle had mowed down pedestrians before a man got out and stabbed a police officer outside the Parliament building. Five people were killed, including the attacker and a police officer, and about 40 others were injured.

O’Gara, a junior music industry major at SUNY Oneonta, said she continued to the next station, near Buckingham Palace, and she and her mother exited the train to get cellphone service and continue on their trip.

She then started receiving news notifications and texts from friends alerting her to the attack, though she said most of the subway riders and tourists around her didn’t seem to be aware of the attack either.

She didn’t get nervous until she called home to let her father, a retired NYPD detective, know she and her mother were OK.

advertisement | advertise on newsday

“At first it wasn’t very chaotic,” she said. “Then I was nervous, I didn’t know if there was an active shooter situation.”

As police cars and sirens began to fill the streets, O’Gara said she, her mother and others took refuge in a tanning salon.

“My phone eventually died, it couldn’t keep up with the texts,” she said.

They left the salon about an hour later and continued on to do some shopping in another area of the city, she said. O’Gara said she is grateful she and her mother were unharmed.

“It’s scary but not characteristic” of London, she said. “I’m fortunate we were in the right place at the right time. If we were 20 minutes earlier, it might not have been at the right time.”