Omar Mir Seddique Mateen has been identified as the gunman who killed 50 people and injured more than 50 others in a rampage in Orlando, Florida, Sunday.

Mateen, who is a U.S-born citizen, opened fire in Pulse, a popular gay nightclub in the city. Armed with an AR-15-style assault rifle and a handgun, Mateen sprayed bullets on some 350 revelers at the club’s Latin music night around 2 a.m. Sunday.

But Mateen had been on law enforcement’s radar long before Sunday’s massacre, which is considered the bloodiest in U.S. history.

A senior law enforcement official told The Daily Beast that Mateen had become a person of interest in 2013 and 2014. The Federal Bureau of Investigation opened a probe into Mateen, but it was ultimately closed when it produced nothing that warranted further investigation.

RELATED: NYC clubs, officials mourn Orlando victims

He’s a known quantity," the source said. "He’s been on the radar before."

About eight years ago, Mateen also met a woman online. She moved from New Jersey to Florida, where Mateen lived, and the pair was married in 2009, his ex-wife told The Washington Post.

"He was not a stable person," she said. "He beat me. He would just come home and start beating me up because the laundry wasn’t finished or something like that."

They lived in Fort Pierce, Florida, more than 100 miles from Orlando, in a condo owned by Mateen's parents. They were divorced in 2011.

RELATED: Philly gay clubs mourn on Pride weekend after Pulse shooting

But his ex-wife said Mateen wasn't very religious and didn't display signs of having fallen to radical Islam.

Mateen's father, an immigrant from Afghanistan, told NBC News that the Orlando club shooting had nothing to do with religion, but rather may have been triggered by a recent event involving two men displaying affection.

"We were in Downtown Miami, Bayside, people were playing music. And he saw two men kissing each other in front of his wife and kid and he got very angry," Mir Seddique told NBC News. "They were kissing each other and touching each other and he said, 'Look at that. In front of my son they are doing that.' And then we were in the men's bathroom and men were kissing each other."

But in the midst of Sunday's attack, Mateen dialed 911. In his message, he pledged allegiance to ISIS and mentioned Tsarnaev brothers behind the 2013 Boston Marathon bombing, Massachusetts State Police said.

RELATED: Boston Pride adds security after Orlando attack

Several ISIS-associated Twitter accounts cheered Mateen's actions, the Daily Caller reported. The accounts, which have since been suspended by Twitter, threatened more violence on U.S. soil if troops don't pull out of Iraq and Syria.

"Stop killing Muslims in Iraq and Syria if you want to live in peace..#Pulse" one tweet read.

Mateen had two firearms licenses, a security officer license and a statewide firearms licence, ABC News reported. He had worked for security firm G4S since 2007.

TMZ posted photos from Mateen's Facebook, in which he wearing New York Police Department clothing, but the NYPD said there's no affiliation.