Image copyright Getty Images

Fort Pierce is the small town where the Orlando killer Omar Mateen lived. It is also in the swing state of Florida. How are people there reacting? And what impact might the attack have on the US presidential election?

It was the railroad that first brought people to Fort Pierce, population just a little over 40,000. Today, it is an unremarkable stop along the Florida East Coast mainline between Jacksonville and Miami.

It's a town of fishing boats and seaside cafes; of churches and small businesses - some thriving, some struggling. It is, in many ways, a typical Florida seaside town.

But Fort Pierce was also home to Omar Mateen. The man who killed 49 people at the Pulse nightclub in Orlando prayed at the Fort Pierce Islamic Centre, a converted church on a nondescript suburban street several blocks back from the waterfront.

"We are all still in shock," said Aziz Chagani, a member of a congregation now trying to comprehend the actions of one of their own.

"I used to see him here," Mr Chagani said. "He came to pray, he had a little boy with him also sometimes, he didn't communicate with anybody."

Image caption The community is in shock, says Aziz Chagani

This is now a community under pressure, as America, in the run-up to its most unpredictable presidential election in years, debates whether the problem is gun control or Islamic immigration.

"I am an American citizen," says Mr Chagani, who is originally from Pakistan and came to the United States 30 years ago.

"This country has been very nice to us.

"My kids have grown up in this country.

"We love this country, that's why we are here, so if anything happens to this country, we feel bad about it."

Omar Mateen is not the only person who frequented the Fort Piece Islamic Centre to have connections to violent extremism.

In 2014, Moner Mohammad Abu-Salha became the first known American suicide bomber to blow himself up in Syria.

At the mosque, they say neither man was radicalised there and the centre has no links to extremism.

The killing in Orlando on Sunday was the deadliest mass shooting in modern American history. But there has been a mass shooting in America almost every day this month.

In 2015 there were 372 mass shootings in the US, more than one for every day of the year.

A mass shooting is defined by the FBI as a single shooting incident that kills or injures four or more people, not including the assailant.

On Fort Pierce's waterfront, where mainly elderly residents cast their rods into the sea for fish, opinion was divided.

For Eric Lewis, the solution is simple: restrict the sale of guns.

"I ain't never touched a gun in my life," he says.

"These hands have never touched a gun. But I see them. No local person should have a weapon like that. They're only made to kill people."

Image caption Eric Lewis wants gun sales to be regulated much more tightly

But others are just as convinced that the answer is more, not fewer guns.

It's a debate that rouses strong passions, and one that fuels divisions over race, religion and politics.

"Americans have to come first, American protection has to come first," says Doreen Aleshin, a retired Wallmart worker.

I point out that Omar Mateen was an American, born in New York to an Afghan father.

"He was an American, but he was raised with radical terrorist thinking," she says.

Mateen's father, Seddique Mateen, has said repeatedly that he does not know why his son carried out the shooting, that he did not know he had "hatred in his heart".

But that doesn't convince Doreen.

Image caption Doreen Aleshin plans to vote for Donald Trump in the presidential elections

"We've got to protect ourselves," she says.

"There's no-one else who will do it for us. I am going to get my concealed weapon permit because of what happened."

The partisan political paralysis of the Obama years has left many in America disillusioned with Washington.

Donald Trump, the businessman and presumptive Republican nominee for the presidency who is pitching himself as an anti-establishment outsider, is capitalising on that.

"We've got to get rid of the politicians. Even if it's only for four years," Doreen says.

"Maybe politicians will then realise, 'We've been put here for the people, not for ourselves or for big business.'"

In the aftermath of Orlando, Donald Trump repeated his call for a halt to Muslim immigration.

For many, such a suggestion goes against the very spirit of America.

But Linda Hudson, the Mayor of Fort Pierce, says that some people are asking whether they've been naive.

She says: "People right now are saying, 'Maybe we need to pay attention to what the Muslims are doing in our country.'

"Nobody wants to hate, though. Americans do not want to hate. They want to be tolerant."

Image caption The Mayor of Fort Pierce, Linda Hudson, says Americans are - and will remain - tolerant

Fort Pierce has the same social and economic divisions you see across America.

On one side of the railroad tracks, the affluence of a town attracting businesses and tourists; on the other, shuttered shops, boarded-up houses - the poverty of a country still suffering the after-effects of economic crisis.

Natalie's Orchid Island Juice Company is a typical, small family-owned business.

It produces 3,000 litres (660 gallons) of Florida orange juice per week, shipping produce across the country and around the world.

The eponymous Natalie Sexton, a co-owner of the company, says the tragedy in Orlando is having a polarising effect.

"People do come together, and they do mourn," she says.

"They support each other, and they do want to see our country as a whole succeed.

"But I think we're at the brink of change with an election coming up.

"So each person stands on a particular side of the political spectrum, and I think this is only pushing people further apart."

Investigators are still trying to work out exactly what turned a man from Fort Pierce into a mass murderer.

November's election is some way off.

But already the tragedy of Orlando has made its imprint on the campaign.

Gabriel Gatehouse was reporting for BBC Newsnight. You can watch his report here - and follow him on Twitter.