Orlando (AFP) – Early reports on the background of the gunman who slaughtered at least 50 people at a Florida nightclub paint a picture of a violent and prejudiced young man.

The suspect, 29-year-old Omar Mateen, is a Muslim American of Afghan descent and police are investigating whether he may have had a terrorist motive.

US law enforcement is investigating whether he had links to — or was inspired by — Islamist terrorism.

And US media, citing law enforcement sources, reported that he called police during the massacre to claim allegiance to the Islamic State group.

But relatives interviewed by US media say Mateen, who worked as a security officer, was not overly religious but had anti-gay views and had regularly assaulted his ex-wife.

Mateen’s shocked father, Mir Seddique, said his son had recently been offended to see two gay men expressing affection on a Miami street.

“We were in downtown Miami, Bayside, people were playing music,” the father told NBC News in the immediate aftermath if the shooting.

“And he saw two men kissing each other in front of his wife and kid and he got very angry,” Seddique said.

The attack, which became the worst mass shooting in modern US history, was carried out in the Pulse nightclub, a well-known gay hangout.

“We are in shock like the whole country,” Seddique added. “This had nothing to do with religion.”

In a separate interview, a former wife of the suspect who left him in 2011 fearing for her life, said he was violently abusive.

“He was not a stable person,” the ex-wife told the Washington Post, which did not identify her because she fears for her safety.

“He beat me. He would just come home and start beating me up because the laundry wasn’t finished or something like that,” she told the Post.

According to the wife’s account the pair had met in New York but in March 2009 had moved in together in Fort Pierce, Florida.

The woman’s parents later rescued her from the relationship and the pair were later divorced, according to a court document seen by AFP.

She described him a “private person” but not especially expressive about his Muslim faith.

He owned a small caliber handgun and worked as a guard at a secure facility for juvenile delinquents.

According to a report by the Daily Beast website, citing FBI sources, Mateen was investigated twice for possible extremist links in 2013 and 2014 but never prosecuted.

According to the Florida Department of Agriculture and Consumer Services website, he had a gun license set to expire in September of next year.