(CNN) Back in April, officers in Thousand Oaks, California, responded to a disturbance at the home where Ian David Long lived.

Long, a 28-year-old who served in Afghanistan with the Marines, was acting somewhat irate and a little irrationally, according to Ventura County Sheriff Geoff Dean

A mental health specialist with the crisis team met with him and felt he might be suffering from post-traumatic stress disorder. But after speaking with him, they decided not to detain him under laws that allow for the temporary detention of people with psychiatric issues.

Seven months later, officers swarmed his home again for a very different reason: a mass shooting.

Long was identified by police on Thursday as the gunman who killed 12 people and injured more than a dozen more in a sudden burst of violence at the Borderline Bar & Grill in Thousand Oaks. Authorities have no motive yet.

Authorities have identified a Facebook post believed to have been made by the shooter around the time of the attack, according to a law enforcement official familiar with the ongoing investigation.

In it, the writer says: "I hope people call me insane... (laughing emojis).. wouldn't that just be a big ball of irony? Yeah.. I'm insane, but the only thing you people do after these shootings is 'hopes and prayers'.. or 'keep you in my thoughts'... every time... and wonder why these keep happening..."

When CNN read the post to a friend of Long's, who did not want to be publicly identified, the friend said, "That does not sound like Ian to me at all. I don't know what was going through his head when he wrote this. It must have been terrible."

Shooter began firing outside

Survivors of the shooting said the gunman, dressed in black and wearing glasses, shot a security guard outside and then shot a young woman working at the counter just inside the door before opening fire on others.

One of the victims , Ventura County Sgt. Ron Helus , was fatally shot when he entered the bar and tried to stop the rampaging gunman, Dean said.

Police found Long dead of what Dean said he believed to be a self-inflicted gunshot.

One handgun, a legally purchased .45-caliber Glock, was at the scene. The gunman used an extended magazine in the shooting, Dean said.

He was a frequent visitor to the bar

On Thursday morning, Dean said he did not know of any connection between Long and the Borderline bar.

But Long's friends told CNN he was there frequently.

Police identified Ian David Long as the gunman in the mass shooting.

"We would go to Borderline together. He really liked it," said one woman who has been friends with Long for five years and does not want her name made public.

"I would make fun of him, because he would drag me there. Sometimes we'd go there to have a drink, sit and talk, listen to music," she said.

Borderline, a Western-themed establishment known to regularly host country, salsa and swing dancing nights, was hosting a college country night on Wednesday evening.

"There was a community there. He was a part of that community. The whole bar is line dancing. People do choreographed dances for hours, cowboy boots and hats in the middle of the suburbs of Thousand Oaks," the friend said.

A person who was a friend of Long's until their early 20s and who did not want their name revealed publicly similarly said they used to go to Borderline together. The friend expressed shock that Long could be a killer.

"I don't know what the hell happened. He was always happy. I never thought this would ever come from him. We used to go snowboarding all the time. He was a good guy," the friend said.

A third friend who did not want to be publicly identified said Long stopped communicating two years ago but said the shooting was unlike him.

"He wasn't unhinged, he wasn't violent. He was a sweet guy who served his country and was using his GI Bill to go to college and get a degree to help more people," the friend said. "Out of our group of friends I thought the highest of him."

Todd Stratton, who knew Long from high school, was at Borderline but didn't get a good enough look to recognize the shooter.

He said Long had anger issues in school but it was nothing that concerned him.

He was in the Marine Corps

The gunman was a corporal in the Marines from August 2008 to March 2013, according to Defense Department records.

He went to Afghanistan from November 2010 to June 2011.

Thomas Burke, a pastor who served with Long in the same US Marine Corps regiment, said Long's battalion arrived during intense fighting in Helmand province.

But Burke warned against too quickly blaming Long's actions on trauma experienced during war.

"PTSD doesn't create homicidal ideation," Burke said. "We train a generation to be as violent as possible, then we expect them to come home and be OK. It's not mental illness. It's that we're doing something to a generation, and we're not responding to the needs they have."

Long posted information about his military service on a special forces forum called ShadowSpear in March 2017.

Under the name "doorkicker03," Long said he was an infantry machine gunner while in the Marine Corps for 4½ years, and was an instructor in Okinawa in Japan.

Photos: In photos: Mass shooting at California bar Molly Esterline is hugged by David Crawford on the scene of a shooting at a bar in Thousand Oaks, California, on Thursday, November 8. Hide Caption 1 of 24 Photos: In photos: Mass shooting at California bar People stand in a parking lot along South Moorpark Road in Thousand Oaks in the aftermath of the shooting. Hide Caption 2 of 24 Photos: In photos: Mass shooting at California bar Investigators huddle at the command post near the bar. Hide Caption 3 of 24 Photos: In photos: Mass shooting at California bar Nellie Wong cries as Chyann Worrell holds her and Erika Sigman, right, stands beside them. All three were inside the Borderline Bar and Grill when shooting started. Hide Caption 4 of 24 Photos: In photos: Mass shooting at California bar Police work outside the venue where the shooting occurred. Hide Caption 5 of 24 Photos: In photos: Mass shooting at California bar Tim Dominguez, who was in the bar with his son, sits distraught under a freeway overpass near the crime scene in Thousand Oaks. Hide Caption 6 of 24 Photos: In photos: Mass shooting at California bar Holden Harrah, 21, right, hugs family and friends after witnessing the shooting. Hide Caption 7 of 24 Photos: In photos: Mass shooting at California bar A forensics team collects evidence at the scene. Hide Caption 8 of 24 Photos: In photos: Mass shooting at California bar An American Red Cross Disaster Relief vehicle is seen outside the Thousands Oaks Teen Center where people have come for family assistance following the bar shooting. Hide Caption 9 of 24 Photos: In photos: Mass shooting at California bar Law enforcement officers guard the road leading to the Borderline Bar and Grill. Hide Caption 10 of 24 Photos: In photos: Mass shooting at California bar People comfort each other near the scene of a mass shooting at the Borderline Bar & Grill in Thousand Oaks, Californina, early Thursday, November 8. Hide Caption 11 of 24 Photos: In photos: Mass shooting at California bar Ventura County Sheriff Geoff Dean briefs reporters on the deadly shooting. Hide Caption 12 of 24 Photos: In photos: Mass shooting at California bar A woman who fled from the shooting gets hugs from relatives in Thousand Oaks. Hide Caption 13 of 24 Photos: In photos: Mass shooting at California bar An FBI agent talks to a potential witness. Hide Caption 14 of 24 Photos: In photos: Mass shooting at California bar Officers stand near a police SUV at the shooting scene in an image from aerial video. Hide Caption 15 of 24 Photos: In photos: Mass shooting at California bar Matt Wennerstorm, still wearing a blood-stained shirt, talks to members of the media outside the Borderline Bar & Grill. Hide Caption 16 of 24 Photos: In photos: Mass shooting at California bar Investigators in hazmat outfits work out of the command center at the shooting scene. Hide Caption 17 of 24 Photos: In photos: Mass shooting at California bar People comfort each other near the shooting scene. Hide Caption 18 of 24 Photos: In photos: Mass shooting at California bar Women who fled from the shooting stand by a sheriff's deputy. Hide Caption 19 of 24 Photos: In photos: Mass shooting at California bar People await news about their friends in the Borderline Bar & Grill shooting. Hide Caption 20 of 24 Photos: In photos: Mass shooting at California bar People walk away from the shooting scene. Hide Caption 21 of 24 Photos: In photos: Mass shooting at California bar Police vehicles block an intersection near the shooting in an image from aerial video. Hide Caption 22 of 24 Photos: In photos: Mass shooting at California bar Sheriff's deputies speak to a possible witness. Hide Caption 23 of 24 Photos: In photos: Mass shooting at California bar People console one another near the shooting scene. Hide Caption 24 of 24

Curtis Kellogg, a friend who served with Long, said the last time he spoke with Long he was headed to Southern California.

"He had a great sense of humor and like most Marines who have seen combat it could get dark at times, just like all of us," Kellogg said.

"He was excited to get out so he could go back home, ride his motorcycle again and finish school."

Long, whose Marines unit was based in Hawaii, was married in 2009 in Honolulu. The couple separated in 2011 and dissolved the marriage in April 2013 in Ventura County, California. He and his then-wife said they had no children and owned no property.

A settlement agreement stated, "Irreconcilable differences have caused the irremediable breakdown of our marriage."

After leaving the Marines in 2013, Long went to college in California.

"I am graduating with a B.S. in Athletic Training in two months," he wrote in his ShadowSpear post. "I found out a little too late that just wasn't the job for me. Maybe the ego got the better of me but it took only one time for a 19-year-old D-2 athlete to talk down to me and tell me how to do my job that I realized this wasn't the career I wanted to head."

Long did not complete his degree. He was a student at California State University, Northridge, majoring in athletic training from 2013 to 2016, but he did not graduate, university representative Carmen Ramos Chandler said.

Long also went to the College of the Canyons for two spring semesters, according to that school

He lived with his mother

Sheriff's deputies stand outside Ian David Long's house Thursday in Newbury Park, California.

Paul Delacourt, assistant director of the FBI's Los Angeles office, said agents are processing Long's home and vehicle in an effort to identify his motivation and paint a picture of his frame of mind. There are no indications Long was working with any associates, he said.

A neighbor said Long's mother "lived in fear" of what her son might do, saying when police were called to the house earlier this year "it took them about a half a day to get him out of the house."

Neighbor Richard Berge said Long's mother told him she was concerned about her son, though not worried about her own safety, and that "she was ... kind of beside herself, she didn't know what to do because he wouldn't get help."

Berge said when he saw police activity at the house on Thursday morning, "I knew what it was."